[Django] #22606: Locmemcache has_key fails when cache expiry is None (infinite)

5 views
Skip to first unread message

Django

unread,
May 9, 2014, 6:11:11 AM5/9/14
to django-...@googlegroups.com
#22606: Locmemcache has_key fails when cache expiry is None (infinite)
-------------------------------------+--------------------
Reporter: boxm | Owner: nobody
Type: Uncategorized | Status: new
Component: Core (Cache system) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+--------------------
If cache is the locmemcache:

{{{
>>> cache.set("key", "value", None)
>>> cache.has_key("key")
False

}}}

Reported by Piotr Gosławski on django-dev

--
Ticket URL: <https://code.djangoproject.com/ticket/22606>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 9, 2014, 6:11:28 AM5/9/14
to django-...@googlegroups.com
#22606: Locmemcache has_key fails when cache expiry is None (infinite)
-------------------------------------+-------------------------------------
Reporter: boxm | Owner: boxm
Type: Bug | Status: assigned

Component: Core (Cache system) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
Has patch: 0 | Unreviewed
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by boxm):

* status: new => assigned
* needs_better_patch: => 0
* needs_tests: => 0
* owner: nobody => boxm
* needs_docs: => 0
* type: Uncategorized => Bug


--
Ticket URL: <https://code.djangoproject.com/ticket/22606#comment:1>

Django

unread,
May 9, 2014, 6:26:16 AM5/9/14
to django-...@googlegroups.com
#22606: Locmemcache has_key fails when cache expiry is None (infinite)
-------------------------------------+-------------------------------------
Reporter: boxm | Owner:
Type: Bug | Status: new

Component: Core (Cache system) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
Has patch: 1 | Unreviewed

Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by boxm):

* owner: boxm =>
* status: assigned => new
* has_patch: 0 => 1


Comment:

Pull request: https://github.com/django/django/pull/2644

--
Ticket URL: <https://code.djangoproject.com/ticket/22606#comment:2>

Django

unread,
May 9, 2014, 12:21:59 PM5/9/14
to django-...@googlegroups.com
#22606: Locmemcache has_key fails when cache expiry is None (infinite)
-------------------------------------+------------------------------------
Reporter: boxm | Owner:
Type: Bug | Status: new

Component: Core (Cache system) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+------------------------------------
Changes (by claudep):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/22606#comment:3>

Django

unread,
May 9, 2014, 1:47:26 PM5/9/14
to django-...@googlegroups.com
#22606: Locmemcache has_key fails when cache expiry is None (infinite)
-------------------------------------+-------------------------------------
Reporter: boxm | Owner: Claude
Type: Bug | Paroz <claude@…>
Component: Core (Cache system) | Status: closed
Severity: Normal | Version: master
Keywords: | Resolution: fixed
Has patch: 1 | Triage Stage: Accepted

Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz <claude@…>):

* status: new => closed
* owner: => Claude Paroz <claude@…>
* resolution: => fixed


Comment:

In [changeset:"66880e4cd128ea81ae53ac6f292f00c563521009"]:
{{{
#!CommitTicketReference repository=""
revision="66880e4cd128ea81ae53ac6f292f00c563521009"
Fixed #22606 -- Locmemcache has_key() failed for infinite cache expiry

Refactored cache expiry logic for Locmemcache to make consistent across
all places where accessed, and correctly handle None as expiry time.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22606#comment:4>

Django

unread,
May 9, 2014, 1:48:25 PM5/9/14
to django-...@googlegroups.com
#22606: Locmemcache has_key fails when cache expiry is None (infinite)
-------------------------------------+-------------------------------------
Reporter: boxm | Owner: Claude
Type: Bug | Paroz <claude@…>
Component: Core (Cache system) | Status: closed
Severity: Normal | Version: master
Keywords: | Resolution: fixed
Has patch: 1 | Triage Stage: Accepted
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"8a090c21f10c503dd5f29885e78bfb0cb5588ba4"]:
{{{
#!CommitTicketReference repository=""
revision="8a090c21f10c503dd5f29885e78bfb0cb5588ba4"
[1.7.x] Fixed #22606 -- Locmemcache has_key() failed for infinite cache
expiry

Refactored cache expiry logic for Locmemcache to make consistent across
all places where accessed, and correctly handle None as expiry time.

Backport of 66880e4cd from master.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22606#comment:5>

Reply all
Reply to author
Forward
0 new messages