Method: ContentfulRails::Caching::Timestamps::ClassMethods#clear_cache_for

Defined in:
lib/contentful_rails/caching/timestamps.rb

#clear_cache_for(item_id) ⇒ Object

Clear an existing timestamp from the cache; called by the subscriber to the Entry notifications from the WebhooksController.



17
18
19
20
21
# File 'lib/contentful_rails/caching/timestamps.rb', line 17

def clear_cache_for(item_id)
  cache_key = timestamp_cache_key(item_id)

  Rails.cache.delete(cache_key)
end