One of the major weaknesses of the Rails cache file store is that cached pages cannot be expired by time. This poses a problem for keeping caching as simple as possible.
The solution I came up with stores cached content as a JSON file containing the content and the ttl.
Expiration needs only be set when @cache@ is called. @read_fragment@ should know nothing about expiration.
The code that makes this work should go in @lib/hash_file_store.rb@
Put the following line in @config/environment.rb@ and it should be good to go.