Sha256: ac99741f474ff603e458e3d0847d54131d6cf7ac014ae4842b2cf15550dc21cd

Contents?: true

Size: 327 Bytes

Versions: 39

Compression:

Stored size: 327 Bytes

Contents

module MongoMapper
  module Plugins
    module AttributesCache
      
      module InstanceMethods
        def cache
          @cache ||= {}
        end

        def clear_cache
          @cache = {}
        end

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

Version data entries

39 entries across 39 versions & 3 rubygems

Version Path
mongo_mapper_ext-0.2.2 lib/mongo_mapper_ext/plugins/attributes_cache.rb
mongo_mapper_ext-0.1.1 lib/mongo_mapper_ext/plugins/attributes_cache.rb
mongo_mapper_ext-0.1.0 lib/mongo_mapper_ext/plugins/attributes_cache.rb
mongo_mapper_ext-0.0.1 lib/mongo_mapper_ext/plugins/attributes_cache.rb
crystal-ext-0.0.3 lib/mongo_mapper_ext/plugins/attributes_cache.rb
crystal-ext-0.0.2 lib/mongo_mapper_ext/plugins/attributes_cache.rb
crystal-ext-0.0.1 lib/mongo_mapper_ext/plugins/attributes_cache.rb
rails-ext-0.3.29 lib/mongo_mapper_ext/plugins/attributes_cache.rb
rails-ext-0.3.28 lib/mongo_mapper_ext/plugins/attributes_cache.rb
rails-ext-0.3.27 lib/mongo_mapper_ext/plugins/attributes_cache.rb
rails-ext-0.3.25 lib/mongo_mapper_ext/plugins/attributes_cache.rb
rails-ext-0.3.24 lib/mongo_mapper_ext/plugins/attributes_cache.rb
rails-ext-0.3.23 lib/mongo_mapper_ext/plugins/attributes_cache.rb
rails-ext-0.3.22 lib/mongo_mapper_ext/plugins/attributes_cache.rb
rails-ext-0.3.21 lib/mongo_mapper_ext/plugins/attributes_cache.rb
rails-ext-0.3.20 lib/mongo_mapper_ext/plugins/attributes_cache.rb
rails-ext-0.3.19 lib/mongo_mapper_ext/plugins/attributes_cache.rb
rails-ext-0.3.18 lib/mongo_mapper_ext/plugins/attributes_cache.rb
rails-ext-0.3.17 lib/mongo_mapper_ext/plugins/attributes_cache.rb
rails-ext-0.3.16 lib/mongo_mapper_ext/plugins/attributes_cache.rb