Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memoization directive #42

Open
vemv opened this issue Apr 8, 2019 · 0 comments
Open

Memoization directive #42

vemv opened this issue Apr 8, 2019 · 0 comments

Comments

@vemv
Copy link
Contributor

vemv commented Apr 8, 2019

(speced/defn ^{::speced/memoize 100
               ::speced/spec    int?}
  foo ...)

...would be cool. 100 would mean up to 100 elements under a default caching strategy (e.g. LRU). Custom https://github.com/clojure/core.cache strategies could be passed.

A particularly interesting caching strategy would be per-request, a la https://github.com/steveklabnik/request_store

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant