heatseeknyc/heatseeknyc — pull request #3 by hoffm (2014-09-05 23:49:09+00:00)
Title: Initial controller work for caching Tumblr data for the blog.

This request caches data retrieved from the Tumblr API. It is incomplete as in that it does not configure a cache store for production. At the moment, the cache store declaration is [commented out](https://github.com/hoffm/heatseeknyc/blob/master/config/environments/production.rb#L56) in the production config. Getting memcached up and running in production may be as simple as installing the [dalli gem](https://github.com/mperham/dalli) and setting the cache store to `:mem_cache_store`, but I'll leave this to someone more familiar with the production environment.

The caching scheme is very simple: We cache the relevant data retrieved from Tumblr for each page of the blog, and we expire all of the caches hourly, at the top of the hour. This timeout is implemented by adding a timestamp to the cache keys that's specific only up to the hour (`Time.now.strftime('%Y%m%d%H')`).