Code Monkey home page Code Monkey logo

Comments (5)

niwinz avatar niwinz commented on June 9, 2024

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.

dasloss avatar dasloss commented on June 9, 2024

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.

niwinz avatar niwinz commented on June 9, 2024

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.

niwinz avatar niwinz commented on June 9, 2024

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.

kevin-brown avatar kevin-brown commented on June 9, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.