Module: Nitro::Caching

Included in:
Controller
Defined in:
lib/nitro/caching.rb,
lib/nitro/caching/proxy.rb,
lib/nitro/caching/output.rb,
lib/nitro/caching/actions.rb,
lib/nitro/caching/fragments.rb

Overview

Adds support for caching.

Defined Under Namespace

Modules: Actions, Fragments, Output Classes: Proxy

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

:nodoc:



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/nitro/caching.rb', line 25

def self.included(base) #:nodoc:
  base.send :include, Output, Actions, Fragments
  base.module_eval do
#      @caching_enabled = true
    def self.caching_enabled?
      Caching.caching_enabled # and @caching_enabled
    end

    private 
    
    def caching_enabled?
      Caching.caching_enabled # and self.class.get_instance_variable(:caching_enabled)
    end
  end
end