square/kochiku — pull request #77 by robolson (2014-05-21 16:37:46+00:00)
Title: Introduce fragment caching

Start with two areas:
* build_time_history json endpoint
* recent project performance stats in top right of project show page

The project show page is the slowest page because of these two areas. The stats stuff generates a ton of sql queries and build_time_history is one big slow query.

Open question: what should the cache store be? Right now I am using the default which is disk but we have Redis available.

A downside to adding this caching is I had to add `touch` to the project -> build -> build_part -> build_artifact chain. The `updated_at`s are going to be changing frequently in order to make cache expiration easy.