Sha256: 75f3bb4a5bb58a14991ebff9aa3aa30cf013645edda1bd7c6a105a81f203eb01

Contents?: true

Size: 504 Bytes

Versions: 11

Compression:

Stored size: 504 Bytes

Contents

module ActionControllerCachingExtensions
  
  module ClassMethods
    
    def expire_page(path)
      return unless perform_caching
      
      path = Pathname.new(page_cache_path(path)).relative_path_from(Pathname.new(Rails.root))
      Dir.chdir Rails.root
      
      instrument_page_cache :expire_page, path do
        Dir.glob(path, File::FNM_CASEFOLD).each { |f| File.delete(f) }
        Dir.glob(path + '.gz', File::FNM_CASEFOLD).each { |f| File.delete(f) }
      end
    end
    
  end
  
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
imagine_cms-5.2.6 lib/extensions/action_controller_caching_extensions.rb
imagine_cms-5.2.5 lib/extensions/action_controller_caching_extensions.rb
imagine_cms-5.2.4 lib/extensions/action_controller_caching_extensions.rb
imagine_cms-5.2.3 lib/extensions/action_controller_caching_extensions.rb
imagine_cms-5.2.2 lib/extensions/action_controller_caching_extensions.rb
imagine_cms-5.2.1 lib/extensions/action_controller_caching_extensions.rb
imagine_cms-5.2.0 lib/extensions/action_controller_caching_extensions.rb
imagine_cms-4.2.4 lib/extensions/action_controller_caching_extensions.rb
imagine_cms-4.2.3 lib/extensions/action_controller_caching_extensions.rb
imagine_cms-4.2.2 lib/extensions/action_controller_caching_extensions.rb
imagine_cms-4.2.1 lib/extensions/action_controller_caching_extensions.rb