Skip to content

forget-store: #[store(all = name)] + #[store] keeps fn attributes - #629

Merged
sfisol merged 3 commits into
masterfrom
forget-store
Nov 3, 2026
Merged

sfisol merged 3 commits into
masterfrom
forget-store

Conversation

@sfisol

@sfisol sfisol commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator
  • fix: #[store] dropped the attributes of the function it wraps — doc comments, #[cfg], #[allow]. They're now emitted on the generated fn.
  • feat: #[store(all = name)] on a store with arguments also generates fn name() -> Vec: clones of every value the store has made so far, in no particular order. Typical use is invalidating every page of a list when an item is gone: all_post_lists().iter().for_each(LazyCache::forget).

@sfisol
sfisol requested a review from szagi3891 November 2, 2026 11:53
szagi3891
szagi3891 previously approved these changes Nov 2, 2026
@sfisol
sfisol merged commit 7cf6301 into master Nov 3, 2026
4 checks passed
@sfisol
sfisol deleted the forget-store branch November 3, 2026 11:56
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