Sha256: 0284d9c51a35517cdd4e26b418a528f1ee6e5ce2ab637aa59896f22505b03f51

Contents?: true

Size: 270 Bytes

Versions: 3

Compression:

Stored size: 270 Bytes

Contents

module MongoMapper::Plugins::AttributeCache
  extend ActiveSupport::Concern
  
  module InstanceMethods
    def cache
      @cache ||= {}
    end

    def clear_cache
      @cache = {}
    end

    def reload
      @cache.clear if @cache
      super
    end
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mongo_mapper_ext-0.2.7 lib/mongo_mapper_ext/mongo_mapper/plugins/attribute_cache.rb
mongo_mapper_ext-0.2.6 lib/mongo_mapper_ext/mongo_mapper/plugins/attribute_cache.rb
mongo_mapper_ext-0.2.5 lib/mongo_mapper_ext/mongo_mapper/plugins/attribute_cache.rb