metosin / porsas

Experimental stuff for going fast with Clojure + JDBC & Async SQL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use Bounded Cache with Context

ikitommi opened this issue · comments

The default implementation stores all unique SQL sentences on a HashMap, which is a potential memoery leak. The default should be a fast bounded cache.

Thoughts on using Caffeine as a default cache backend? Already has Clojure wrappings
Another option is using core.cache.
Caffeine is probably more battle-tested.
I'd be happy to implement the chosen solution.

@ikitommi @bsless I spent some time today adding a caching layer, see #15. Let me know what you think.