has anyone ever looked at making ActiveSupport::Cache::MemoryStore
respect the :expires_in option?
I had a go,
and built a plugin to add it.
It should work in the same way MemcacheStore does with :expires_in.
Although it will use up more memory that the basic MemoryStore,
can anyone see any other problem with it?
(it's not threadsafe, but nothing is apparently, including 'require')
It's currently our default cache_store at work,
will see how that works out in production.
The whole Rails framework is threadsafe, so I’d think twice before stating that “nothing is”.
threadsafe, but nothing is apparently, including 'require')
The whole Rails framework is threadsafe, so I'd think twice before stating
that "nothing is".
you obviously missed this amusing discussion on ruby-core
And my point was that the default cache store (MemoryStore) is already
But the same :expires_in functionality can easily be applied to
SynchronisedMemoryStore if needed.
And that's why Rails preloads *everything* when you have
config.threadsafe! in production.rb. Even in edge where Rails has
moved to using autoload, it's all preloaded in threadsafe mode.
I haven't actually looked at how Merb eager-loads.
Maybe it doesn't.
Ultimately I don't run in jruby.
Thread-safety is a magic buzzword I've never made use of.
been drinking too much real ale, have a good evening.