Comments (5)
Hi! Thanks for your report! It seems that redis does not expires inmediatelly cache keys with negative timeouts.
I need some time for investigate about it.
In any case, I used it in many projects for store session and it works without any problems.
Thanks.
from django-redis.
No problem, thanks for your fast reply.
On Tue, Sep 17, 2013 at 2:55 PM, Andrey Antukh [email protected]:
Hi! Thanks for your report! It seems that redis does not expires
inmediatelly cache keys with negative timeouts.
I need some time for investigate it.In any case, I used it in many projects for store session and it works
without any problems.Thanks.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/44#issuecomment-24625806
.
Dakin Sloss
cell: (314) 265-2271
[email protected]
from django-redis.
Hmm, this seems not a django-redis bug, because a django backend does not handle it well on session cache backend.
On the original django session test:
self.session.set_expiry(-timedelta(seconds=10))
set_expiry method set '_session_expiry' key on the cache that is not used never in load session data... is very strange but django-redis can not do any thing with this if session backend not setups in a properly way cache expiration timeout.
from django-redis.
Thees seems not django-redis problem. And, django-redis is used in produccion as sessions storage in various projects and work well.
from django-redis.
I just walked through this (I got sick of seeing the failing tests) and confirmed that it does appear to be a django-redis issue. By default, django-redis assumes that all timeouts that are not positive signal for the key to not have a timeout.
I've got a detailed explanation of why everything happens in a gist: https://gist.github.com/kevin-brown/9238166
Essentially the issue is that django-redis treats all negative timeouts as permanent, which at one point it didn't do. Django expects that negative timeouts when saving will prevent the save from happening. If this sounds like something that should be fixed, I can make a PR that fixes the issue.
from django-redis.
Related Issues (20)
- Connection Pooling doesn't work as intended HOT 1
- Pytest 7.0 compatibility HOT 1
- Drop django 4.0
- Drop support for django 3.2 HOT 1
- How to configure and connect redis cluster correctly? HOT 2
- Django `TIMEOUT` setting not working as expected HOT 2
- Which timezone wil it take? system timezone or django timezone HOT 1
- Why Django Redis does not raise exception while connecting to Redis Server with SSL param equal string "False"
- `Expire` method fails when using `DEFAULT_TIMEOUT` HOT 1
- Getting/Setting occasionally extremely slow HOT 5
- django requirements update
- Add NX, XX, GT and LT to expire and pexpire HOT 2
- Multiple redis caches with fallback mechanism HOT 1
- Is it necessary to get coverage of tests directory? HOT 2
- Implementing HGET
- using redis in django getting connection error HOT 1
- strict_map_key
- Connection refused on Celery health checks HOT 3
- how to support hash ops, such as hset, hget...
- Reauthentication with Azure AD / Entra ID
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-redis.