Replies: 1 comment 2 replies
-
requests-cache is focused on client-side caching, not server-side, so it doesn't have any direct integration with the Django cache API, but there wouldn't be any problem with using the same Redis instance for both.
Exactly. It should look something like: from django.conf import settings
from requests_cache import CachedSession, RedisCache
backend = RedisCache(host=settings.REDIS_HOST, port=settings.REDIS_PORT)
session = CachedSession('http_cache', backend=backend) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a Django project that used Redis as cache backend.
Now i would like to use requests-cache. How to setup the redis backend? Just pass host+port from django settings?
Or is there a backend that used the django cache API ?
Beta Was this translation helpful? Give feedback.
All reactions