Sha256: a1c73b49abe50ae1b284339de48852cbb3e3f2099f2a545eda23555d5e13dfe2
Contents?: true
Size: 423 Bytes
Versions: 17
Compression:
Stored size: 423 Bytes
Contents
# frozen_string_literal: true module PagesCore class CacheSweeper class << self attr_accessor :enabled def disable(&_block) old_value = enabled self.enabled = false yield if block_given? self.enabled = old_value end def once(&block) disable(&block) PagesCore::StaticCache.handler.sweep! end end self.enabled ||= true end end
Version data entries
17 entries across 17 versions & 1 rubygems