I have a site with a large amount of data and I'm doing "Russian doll" caching on all pages like this:
# articles.html.haml
- cache "list of articles", expires_in: 15.minutes do
= render partial: "article", collection: @articles
# _article.html.haml
- cache article do
= article.body
= render partial: "comment", collection: article.comments
# _comment.html.haml
- cache comment do
= comment.body
This would create hundreds of thousands of fragments.
1. Would this degrade performance with so many fragment files in the /tmp/cache directory?
2. Does rail automatically delete old fragments when they are auto-expired?
PS. The site resides on a single Ubuntu server with 4GB ram. It's not using memcached as the cache store, just the standard file based implementation that comes out of the box with rails.