Skip to content

Latest commit

 

History

History
104 lines (73 loc) · 2.74 KB

storage.rst

File metadata and controls

104 lines (73 loc) · 2.74 KB

Storage

The class of storage is the one implementing MutableMapping interface. There are some storage classes provided with this middleware:

InMemoryStorage

scrapy_cookies.storage.in_memory

This storage enables keeping cookies inside the memory, to provide ultra fast read and write cookies performance.

SQLiteStorage

scrapy_cookies.storage.sqlite

This storage enables keeping cookies in SQLite, which supports already by Python.

The following settings can be used to configure this storage:

  • COOKIES_SQLITE_DATABASE_

MongoStorage

scrapy_cookies.storage.mongo

This storage enables keeping cookies in MongoDB.

The following settings can be used to configure this storage:

  • COOKIES_MONGO_MONGOCLIENT_HOST
  • COOKIES_MONGO_MONGOCLIENT_PORT
  • COOKIES_MONGO_MONGOCLIENT_DOCUMENT_CLASS
  • COOKIES_MONGO_MONGOCLIENT_TZ_AWARE
  • COOKIES_MONGO_MONGOCLIENT_CONNECT
  • COOKIES_MONGO_MONGOCLIENT_KWARGS
  • COOKIES_MONGO_DATABASE
  • COOKIES_MONGO_COLLECTION

RedisStorage

scrapy_cookies.storage.redis

This storage enables keeping cookies in Redis.

The following settings can be used to configure this storage:

  • COOKIES_REDIS_HOST
  • COOKIES_REDIS_PORT
  • COOKIES_REDIS_DB
  • COOKIES_REDIS_PASSWORD
  • COOKIES_REDIS_SOCKET_TIMEOUT
  • COOKIES_REDIS_SOCKET_CONNECT_TIMEOUT
  • COOKIES_REDIS_SOCKET_KEEPALIVE
  • COOKIES_REDIS_SOCKET_KEEPALIVE_OPTIONS
  • COOKIES_REDIS_CONNECTION_POOL
  • COOKIES_REDIS_UNIX_SOCKET_PATH
  • COOKIES_REDIS_ENCODING
  • COOKIES_REDIS_ENCODING_ERRORS
  • COOKIES_REDIS_CHARSET
  • COOKIES_REDIS_ERRORS
  • COOKIES_REDIS_DECODE_RESPONSES
  • COOKIES_REDIS_RETRY_ON_TIMEOUT
  • COOKIES_REDIS_SSL
  • COOKIES_REDIS_SSL_KEYFILE
  • COOKIES_REDIS_SSL_CERTFILE
  • COOKIES_REDIS_SSL_CERT_REQS
  • COOKIES_REDIS_SSL_CA_CERTS
  • COOKIES_REDIS_MAX_CONNECTIONS