Opened 17 months ago

Last modified 4 weeks ago

#27480 assigned New feature

Add a Cache.touch(key, timeout=DEFAULT_TIMEOUT) method

Reported by: Victor Porton Owned by: Nicolas Noé
Component: Core (Cache system) Version: 1.10
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

I do cache.set(crypt, cache.get(crypt)) in order to prolong the life of an entry of the cache.

There should be a shorter easier way like: cache.touch(crypt).

Change History (8)

comment:1 Changed 17 months ago by Victor Porton

It also should have optional timeout argument.

comment:2 Changed 17 months ago by Tim Graham

Summary: A method to touch an entry in a cacheAdd a Cache.touch(key, timeout=DEFAULT_TIMEOUT) method
Triage Stage: UnreviewedAccepted

Seems reasonable since python-memcached and pyblicmc both implement a touch() method, I think.

comment:3 Changed 17 months ago by Nicolas Noé

Owner: changed from nobody to Nicolas Noé
Status: newassigned

comment:4 Changed 17 months ago by Nicolas Noé

Has patch: set

comment:5 Changed 17 months ago by Tim Graham

Patch needs improvement: set

Comments for improvement are on the PR.

comment:6 Changed 16 months ago by Nicolas Noé

Patch needs improvement: unset

Patch was improved, please review.

comment:7 Changed 16 months ago by Tim Graham

Triage Stage: AcceptedSomeday/Maybe

This is blocked on two fixes for python-memcached (PR #107, PR #108) so that the Django tests can use the latest version (#25277) where touch() works.

comment:8 Changed 4 weeks ago by Nicolas Noé

Triage Stage: Someday/MaybeAccepted

Python-memcached blocking issues solved and patch updated, please review.

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