Opened 10 years ago

Closed 10 years ago

Last modified 10 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 by Malcolm Box, 10 years ago

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

comment:2 by Malcolm Box, 10 years ago

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

comment:3 by Claude Paroz, 10 years ago

Triage Stage: UnreviewedAccepted

comment:4 by Claude Paroz <claude@…>, 10 years ago

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 by Claude Paroz <claude@…>, 10 years ago

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