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
Built Distribution
File details
Details for the file scrapy_redis_httpcache-1.1.1.tar.gz
.
File metadata
- Download URL: scrapy_redis_httpcache-1.1.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4d5547d6614528964c5984ee3fcf8448ee14c5787f237465aa7d3f9d8ef7ae4 |
|
MD5 | 7cc6d3841687cfbb2be4c6a1756f74b8 |
|
BLAKE2b-256 | f3b3eb0fc207c57fee80d9c3f1cea2d65e23bcef55b5028450fe70d5679fc569 |
File details
Details for the file scrapy_redis_httpcache-1.1.1-py3-none-any.whl
.
File metadata
- Download URL: scrapy_redis_httpcache-1.1.1-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9c69aa491b21c3bf200e5e908331092c3bbdc9eb67b674a5a811e2acadf4a90 |
|
MD5 | 78a5f723dcf000bd62bd1e5b4d37909c |
|
BLAKE2b-256 | 12923c84723754d1a6402e84b4d357daa8e8ed9d1a1e91d21f2594689b9ad299 |