简体   繁体   中英

Rails page cache with redis?

Has anyone used redis to store the cached html files created by Rails page caching?

I have multiple servers all storing their cache files on a mounted drive but there are latency problems that can't easily be resolved. I can't store the cache files on each machine because I dont have a way to invalidate cache across machines.

Page caching will always write to the file system. Look into using action caching or fragment caching.

Here's the section on memcached from the Rails guide:

http://guides.rubyonrails.org/caching_with_rails.html#activesupport-cache-memcachestore

You'll need this gem if you want to stick with Redis:

https://github.com/jodosha/redis-store

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM