Cache Scrapy responses with Redis.
Project description
scrapy-redis-httpcache
Cache Scrapy responses with Redis.
This package uses uv for project management. To get started, ensure that uv is installed on your machine and updated to the 0.5.6 version. Detailed installation instructions for uv can be found here.
Installation
uv add 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"
Development
uv sync --frozen --group=development
uv run --frozen pre-commit install --install-hooks
uv run --frozen pre-commit install --hook-type=commit-msg
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scrapy_redis_httpcache-1.4.0.tar.gz.
File metadata
- Download URL: scrapy_redis_httpcache-1.4.0.tar.gz
- Upload date:
- Size: 30.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.5.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa15f9afbfd323ebbc29e8697be3a33fd31ded0388ce5a06b1ef82fac69f96e6
|
|
| MD5 |
ae59a395c9cfb9e1cd7a07d804c28c97
|
|
| BLAKE2b-256 |
9c05778d7c794b7b9e5069a3da1fae62058577ea559c18f2c7589800a6cd99be
|
File details
Details for the file scrapy_redis_httpcache-1.4.0-py3-none-any.whl.
File metadata
- Download URL: scrapy_redis_httpcache-1.4.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.5.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d05df5d5bef72c4d8952bae8b9757436171b92c9adbbc637ef3c5cb69cfe225
|
|
| MD5 |
38ffca10b5ea7ca8aeea4931b24d45bd
|
|
| BLAKE2b-256 |
2134c0524af5c747d975acb965e16b4c83198fd64a3bae6ad51570506c7f5e50
|