Similar to ActiveRecord's cache_key method we should implement cache_key and cache_version methods. This allows them to be used as keys for fragment caching. We ought to be able to cache an entire page's render tree based on the Page object's cache_key.
Similar to ActiveRecord's cache_key method we should implement cache_key and cache_version methods. This allows them to be used as keys for fragment caching. We ought to be able to cache an entire page's render tree based on the
Page
object'scache_key
.See https://github.com/rails/rails/blob/master/activesupport/lib/active_support/cache.rb for how these methods are used in Rails caching.