Sha256: a75717ea10e29fa3f3a1d344e33a3d8a1ddaa4cd75bd312385625a5a78099529

Contents?: true

Size: 565 Bytes

Versions: 23

Compression:

Stored size: 565 Bytes

Contents

require 'garner'

Garner.configure do |config|
  config.expires_in = 10.minutes
  config.binding_key_strategy = Garner::Strategies::Binding::Key::CacheKey
  config.whiny_nils = false
end

module Aptible
  module Resource
    class Base < HyperResource
      include Garner::Cache::Binding

      def cache_key
        "#{self.class.name}##{id}"
      end
    end
  end
end

# Cache key overrides
# REVIEW: Should these be defined in a different way?
module Fridge
  class AccessToken
    include Garner::Cache::Binding

    def cache_key
      id
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
aptible-rails-0.7.3 lib/aptible/rails/garner.rb
aptible-rails-0.7.2 lib/aptible/rails/garner.rb
aptible-rails-0.7.1 lib/aptible/rails/garner.rb
aptible-rails-0.7.0 lib/aptible/rails/garner.rb
aptible-rails-0.6.13 lib/aptible/rails/garner.rb
aptible-rails-0.6.12 lib/aptible/rails/garner.rb
aptible-rails-0.6.11 lib/aptible/rails/garner.rb
aptible-rails-0.6.10 lib/aptible/rails/garner.rb
aptible-rails-0.6.9 lib/aptible/rails/garner.rb
aptible-rails-0.6.8 lib/aptible/rails/garner.rb
aptible-rails-0.6.7 lib/aptible/rails/garner.rb
aptible-rails-0.6.6 lib/aptible/rails/garner.rb
aptible-rails-0.6.5 lib/aptible/rails/garner.rb
aptible-rails-0.6.4 lib/aptible/rails/garner.rb
aptible-rails-0.6.3 lib/aptible/rails/garner.rb
aptible-rails-0.6.2 lib/aptible/rails/garner.rb
aptible-rails-0.6.1 lib/aptible/rails/garner.rb
aptible-rails-0.6.0 lib/aptible/rails/garner.rb
aptible-rails-0.5.4 lib/aptible/rails/garner.rb
aptible-rails-0.5.3 lib/aptible/rails/garner.rb