summaryrefslogtreecommitdiff
path: root/modules/custom-comments.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-10 14:45:04 -0500
committerCraig Jennings <c@cjennings.net>2026-05-10 14:45:04 -0500
commit0cceaa706fc2bfdc8c8ca0bccb43e5a9d75d7696 (patch)
tree757aebb63464eae6201026bb585232c0b32b4663 /modules/custom-comments.el
parent1af2c63531bbcefeac2072b218f8e00d5b49e3dd (diff)
downloaddotemacs-0cceaa706fc2bfdc8c8ca0bccb43e5a9d75d7696.tar.gz
dotemacs-0cceaa706fc2bfdc8c8ca0bccb43e5a9d75d7696.zip
feat(cj-cache): add TTL+building cache helper
Phase 5 step 2 of utility-consolidation. Add `modules/cj-cache.el' implementing the API specified in `docs/design/cache-helper-design.org': `cj/cache-make' / `cj/cache-valid-p' / `cj/cache-value-or-rebuild' / `cj/cache-building-p' / `cj/cache-invalidate'. The helper captures the TTL+building-guard pattern that org-agenda-config and org-refile-config currently hand-roll. Both consumers will migrate in follow-up commits. No call-site changes in this commit -- helper plus its 15 tests only. Tests cover: default and custom TTL, fresh/recent/expired/nil-value validity, miss calls build / hit skips build, force-rebuild overrides hit, the four log callbacks (on-hit / on-build-start / on-build-success / on-build-error), error-rethrow and building-flag cleanup on both success and error paths.
Diffstat (limited to 'modules/custom-comments.el')
0 files changed, 0 insertions, 0 deletions