Generic caching on detail templates