Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#22606 closed Bug (fixed)

Locmemcache has_key fails when cache expiry is None (infinite)

Reported by: Malcolm Box Owned by: Claude Paroz <claude@…>
Component: Core (Cache system) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If cache is the locmemcache:

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

Reported by Piotr Gosławski on django-dev

Change History (5)

comment:1 Changed 9 years ago by Malcolm Box

Owner: changed from nobody to Malcolm Box
Status: newassigned
Type: UncategorizedBug

comment:2 Changed 9 years ago by Malcolm Box

Has patch: set
Owner: Malcolm Box deleted
Status: assignednew

comment:3 Changed 9 years ago by Claude Paroz

Triage Stage: UnreviewedAccepted

comment:4 Changed 9 years ago by Claude Paroz <claude@…>

Owner: set to Claude Paroz <claude@…>
Resolution: fixed
Status: newclosed

In 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.

comment:5 Changed 9 years ago by Claude Paroz <claude@…>

In 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.

Note: See TracTickets for help on using tickets.
Back to Top