Skip to content

Add a store_time flag to get and tag filtering to iterkeys - #16

Merged
avgvi merged 3 commits into
masterfrom
feat/store-time-and-tag-iteration
Oct 11, 2026
Merged

avgvi merged 3 commits into
masterfrom
feat/store-time-and-tag-iteration

Conversation

@avgvi

@avgvi avgvi commented Oct 11, 2026

Copy link
Copy Markdown
Member

Two additive features requested upstream.

  • store_time on get (upstream issue 330): Cache.get, FanoutCache.get and DjangoCache.get take store_time=False as their last parameter. When true, the store time is appended after the value and any other requested metadata, in the order expire time, tag, store time, so every existing tuple shape is unchanged when the flag is off; misses and FanoutCache shard timeouts return None for each requested field. One helper builds the tuple for hits, misses and timeouts; the get query selects one more column. pop has its own flags and is untouched.
  • iterkeys(tag=...) (upstream issue 341): upstream pull request 372 merged with its original commit. tag defaults to the ENOVAL sentinel meaning no filter; tag=None selects untagged rows; the filter runs inside the existing key pagination, keeps reverse semantics and fetches no values. It brought parametrized tests and a tutorial section with doctests. FanoutCache has no iterkeys, so nothing to pass through.

Tests: all tuple shapes on the three classes including misses and the FanoutCache timeout path, a file-like value, and the Django variant; the tutorial gains a store_time paragraph with a doctest.

Verified locally: 384 tests pass at 98.85 % on Python 3.12 with Django 4.2 and on 3.14 with Django 6.0, golden fixtures included; bluecheck, isortcheck, flake8, mypy, pylint, doc8, rstcheck and the Sphinx build pass.

@avgvi
avgvi merged commit ca6e348 into master Oct 11, 2026
42 of 44 checks passed
@avgvi
avgvi deleted the feat/store-time-and-tag-iteration branch October 11, 2026 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants