Module: IdentityCache::WithPrimaryIndex

Extended by:
ActiveSupport::Concern
Includes:
WithoutPrimaryIndex
Included in:
IdentityCache
Defined in:
lib/identity_cache/with_primary_index.rb

Defined Under Namespace

Modules: ClassMethods

Constant Summary

Constants included from CacheInvalidation

CacheInvalidation::CACHE_KEY_NAMES

Constants included from CacheKeyGeneration

CacheKeyGeneration::DEFAULT_NAMESPACE

Instance Method Summary collapse

Methods included from WithoutPrimaryIndex

append_features

Methods included from CacheInvalidation

#reload

Methods included from QueryAPI

#_run_commit_callbacks, #was_new_record?

Methods included from CacheKeyGeneration

denormalized_schema_hash, denormalized_schema_string, schema_to_string

Instance Method Details

#expire_cacheObject



9
10
11
12
13
# File 'lib/identity_cache/with_primary_index.rb', line 9

def expire_cache
  expired_primary_index = expire_primary_index

  super && expired_primary_index
end

#expire_primary_indexObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



16
17
18
# File 'lib/identity_cache/with_primary_index.rb', line 16

def expire_primary_index # :nodoc:
  self.class.expire_primary_key_cache_index(id)
end

#primary_cache_index_keyObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



21
22
23
# File 'lib/identity_cache/with_primary_index.rb', line 21

def primary_cache_index_key # :nodoc:
  self.class.cached_primary_index.cache_key(id)
end