melpon / memoize

A method caching macro for elixir using CAS on ETS.
https://hex.pm/packages/memoize
MIT License
189 stars 12 forks source link

Allow for default experation to be set globally #10

Closed mogorman closed 3 years ago

mogorman commented 4 years ago

I almost never want my memos to be permanent. this makes it easier to set that option globally rather than having to write it for every function.

mogorman commented 4 years ago

I made it compile time as I didn't want to put any performance changes as most people probably won't take advantage of it. the disadvantage of this approach is when variable is changed the dependency needs to be recompiled.

melpon commented 3 years ago

Supported https://github.com/melpon/memoize#cache-strategy---memoizecachestrategydefault