Sha256: 9b0f192e5925e0ef373c36ad5d23c257117fa197741d67db6d96303dd4301dff
Contents?: true
Size: 516 Bytes
Versions: 9
Compression:
Stored size: 516 Bytes
Contents
class StructureSweeper < ActionController::Caching::Sweeper observe Structure def after_create(item) expire(item) end def after_update(item) expire(item) end def after_destroy(item) expire(item) end # Clear all orders cache files def self.sweep! cache_store = Rails.application.config.action_controller.cache_store cache_store.clear if cache_store Rails.logger.info("StructureSweeper clear all cache") end private def expire(item=nil) self.class.sweep! end end
Version data entries
9 entries across 9 versions & 2 rubygems