Forum: Radiant CMS How do you configure Rack::Cache in Radiant?

Posted by Jason Fox (jfoxny)
on 2009-10-01 18:02
I'd like to use memcached as the backend storage for Radiant's cache
(v0.8.1), however, I haven't been able to find documentation on how to
configure the backend store.  I know that Radiant uses Rack::Cache now
and I've read how to configure Rack::Cache itself, but, I haven't been
able to figure out how to do it from "within" Radiant.

I found an old post from around the time when Rack::Cache was introduced
that said you can put something like this in your environment:

# environment.rb
config.middleware.use(Rack::Cache,
    :verbose => true, # should be false in real life
    :metastore => "memcached://localhost:11211/radiant/meta",
    :entitystore => "memcached://localhost:11211/radiant/entity")

Which I tried, but, Radiant continued to use the filesystem as it's
cache store, i.e., it wrote it's cache files to RAILS_ROOT/tmp/cache.  I
also noticed that there is a radiant_config_cache.txt file in
RAILS_ROOT/tmp, but, I'm not sure what if anything should go in there.

Any help would be much appreciated.

Thanks in advance,
Jason
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.