Module: Garner

Defined in:
lib/garner/cache.rb,
lib/garner/config.rb,
lib/garner/version.rb,
lib/garner/mixins/rack.rb,
lib/garner/cache/binding.rb,
lib/garner/cache/context.rb,
lib/garner/cache/identity.rb,
lib/garner/mixins/mongoid/document.rb,
lib/garner/mixins/mongoid/identity.rb,
lib/garner/mixins/active_record/base.rb,
lib/garner/strategies/binding/key/base.rb,
lib/garner/strategies/context/key/base.rb,
lib/garner/strategies/context/key/jsonp.rb,
lib/garner/strategies/context/key/caller.rb,
lib/garner/strategies/binding/key/cache_key.rb,
lib/garner/strategies/context/key/request_get.rb,
lib/garner/strategies/context/key/request_path.rb,
lib/garner/strategies/context/key/request_post.rb,
lib/garner/strategies/binding/invalidation/base.rb,
lib/garner/strategies/binding/key/binding_index.rb,
lib/garner/strategies/binding/invalidation/touch.rb,
lib/garner/strategies/binding/key/safe_cache_key.rb,
lib/garner/strategies/binding/invalidation/binding_index.rb

Defined Under Namespace

Modules: Cache, Config, Mixins, Strategies

Constant Summary collapse

VERSION =
'0.5.2'

Class Method Summary collapse

Class Method Details

.configureConfig Also known as: config

Set the configuration options. Best used by passing a block.

Examples:

Set up configuration options.

Garner.configure do |config|
  config.cache = Rails.cache
end

Returns:

  • (Config)

    The configuration object.


11
12
13
# File 'lib/garner/config.rb', line 11

def configure
  block_given? ? yield(Garner::Config) : Garner::Config
end