Skip to main content

Cache Scrapy responses with Redis.

Project description

scrapy-redis-httpcache

Cache Scrapy responses with Redis.

Installation

pip install scrapy-redis-httpcache

Usage

Add the following settings to your Scrapy project settings file:

DOWNLOADER_MIDDLEWARES = {
    "scrapy.downloadermiddlewares.httpcache.HttpCacheMiddleware": 100,
    ...
}
HTTPCACHE_ENABLED = True
HTTPCACHE_EXPIRATION_SECS = ... # optional, defaults to 3600
HTTPCACHE_REDIS_DB = ... # optional, defaults to 0
HTTPCACHE_REDIS_HOST = ... # optional, defaults to "localhost"
HTTPCACHE_REDIS_PASSWORD = ... # optional, defaults to None
HTTPCACHE_REDIS_PORT = ... # optional, defaults to 6379
HTTPCACHE_REDIS_USERNAME = ... # optional, defaults to None
HTTPCACHE_STORAGE = "scrapy_redis_httpcache.RedisCacheStorage"

Contributing

Contributions are welcome! To get started, please refer to our contribution guidelines.

Issues

If you encounter any problems while using this package, please open a new issue here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scrapy_redis_httpcache-1.1.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

scrapy_redis_httpcache-1.1.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file scrapy_redis_httpcache-1.1.1.tar.gz.

File metadata

File hashes

Hashes for scrapy_redis_httpcache-1.1.1.tar.gz
Algorithm Hash digest
SHA256 d4d5547d6614528964c5984ee3fcf8448ee14c5787f237465aa7d3f9d8ef7ae4
MD5 7cc6d3841687cfbb2be4c6a1756f74b8
BLAKE2b-256 f3b3eb0fc207c57fee80d9c3f1cea2d65e23bcef55b5028450fe70d5679fc569

See more details on using hashes here.

File details

Details for the file scrapy_redis_httpcache-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for scrapy_redis_httpcache-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c9c69aa491b21c3bf200e5e908331092c3bbdc9eb67b674a5a811e2acadf4a90
MD5 78a5f723dcf000bd62bd1e5b4d37909c
BLAKE2b-256 12923c84723754d1a6402e84b4d357daa8e8ed9d1a1e91d21f2594689b9ad299

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page