I am using Jbuilder to output the JSON API, and now I want to add caching using the cache_digest cache for Rails 3.2.13.
It works fine, the cache template is created, and it is read from the cache, but the problem is that if I change the model record, for example, change the "header", it does not expire the cache, and it still shows the old header.
This is my jbuilder template index:
json.cache! "news" do |json| json.array!(@news) do |news| json.id news.id json.title news.title json.excerpt news.excerpt json.content strip_links news.content json.image news.image json.source news.source json.published_at news.published_at json.created_at news.created_at end end
I am changing attributes through the RailsAdmin interface.
source share