Open findchris opened 10 years ago
Have you taken a close look at the API ActiveSupport::Cache::Store
and its expectations, especially around size-based constraints?
What sized-based constraints?
For example, the handling of a universal option such as :compress_threshold
. See http://api.rubyonrails.org/classes/ActiveSupport/Cache.html
So are you saying you're against the idea of a fast_cache
-backed Store
because of the overhead/bloat of the base class?
Not at all.
I'm saying that some interesting choices have to be made with respect to how to satisfy the so-called "universal" requirements for all stores in a manner that doesn't throw away the performance benefits of fast_cache. I did not have a strong gut sense on this (or a need for it), which is the only reason why I did not create a separate project as you suggest.
If you want to go ahead and do this, I'd be happy to do a code review.
Nice work with this project. I came to it after looking into why something as ostensibly simple as
ActiveSupport::Cache::MemoryStore
is slower than I expected, and figuring someone had written something better (and you have!). So thanks for that.The
MemoryStore
is aActiveSupport::Cache::Store
, the primary benefit of which is a cache backend-agnostic interface. Would you be interested in makingfast_cache
inherit fromActiveSupport::Cache::Store
, so that it can seamlessly replaceMemoryStore
? I understand if you want to keep this implementationActiveSupport
-free, but maybe a new project such asfast_cache_store
?Would like to hear your thoughts.