sqlalchemy / sqlalchemy/dogpile.cache

Update Expiration time on get

Open
#45 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Python
Stars
299
Forks
50
PR merge metrics
No merged PRs in 30d

Description

Migrated issue, originally created by s (sontek)

We would like our expiration time to re-update on get(), so that actively used items don't fall out of cache or get evicted. I think this would need to update the expiration in both metadata do something like .touch() in memcached.

Probably not the most efficient thing since its going to have to do get->set, so maybe have it as a setting that can be passed?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the cache get() entry point and trace how expiration metadata is read and written, including the memcached touch() behavior mentioned in the issue. Determine whether expiration should refresh on every get and whether this should be configurable. Done means actively accessed items retain their expiration without changing the default behavior unexpectedly.

Written by the indexing model from the issue text.

Assessment

Tech stack
memcached, python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.