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