Module: AridCache

Extended by:
CacheProxy::Utilities, Helpers
Defined in:
lib/arid_cache.rb,
lib/arid_cache/store.rb,
lib/arid_cache/helpers.rb,
lib/arid_cache/proxies.rb,
lib/arid_cache/railtie.rb,
lib/arid_cache/framework.rb,
lib/arid_cache/inflector.rb,
lib/arid_cache/cache_proxy.rb,
lib/arid_cache/active_record.rb,
lib/arid_cache/cache_proxy/options.rb,
lib/arid_cache/cache_proxy/utilities.rb,
lib/arid_cache/inflector/inflections.rb,
lib/arid_cache/cache_proxy/result_processor.rb

Defined Under Namespace

Modules: ActiveRecord, Helpers, Inflector, Proxies Classes: CacheProxy, Framework, Railtie, Store

Constant Summary collapse

Error =

:nodoc:

Class.new(StandardError)

Class Attribute Summary collapse

Class Method Summary collapse

Methods included from CacheProxy::Utilities

collection_klass, find_all_by_id, namespaced_column, object_class, order_by

Methods included from Helpers

define, lookup, subclasses_of

Class Attribute Details

.frameworkObject

Returns the value of attribute framework


20
21
22
# File 'lib/arid_cache.rb', line 20

def framework
  @framework
end

Class Method Details

.cacheObject


33
34
35
# File 'lib/arid_cache.rb', line 33

def self.cache
  AridCache::CacheProxy
end

.clear_cachesObject


37
38
39
# File 'lib/arid_cache.rb', line 37

def self.clear_caches
  AridCache::CacheProxy.clear_caches
end

.clear_class_caches(object) ⇒ Object


41
42
43
# File 'lib/arid_cache.rb', line 41

def self.clear_class_caches(object)
  AridCache::CacheProxy.clear_class_caches(object)
end

.clear_instance_caches(object) ⇒ Object


45
46
47
# File 'lib/arid_cache.rb', line 45

def self.clear_instance_caches(object)
  AridCache::CacheProxy.clear_instance_caches(object)
end

.included(base) ⇒ Object

The old method of including this module, if you don't want to extend active record. Just add 'include AridCache' to your model class.


56
57
58
# File 'lib/arid_cache.rb', line 56

def self.included(base)
  base.send(:include, AridCache::ActiveRecord)
end

.raw_with_optionsObject


29
30
31
# File 'lib/arid_cache.rb', line 29

def self.raw_with_options
  !!@raw_with_options
end

.raw_with_options=(value) ⇒ Object

Set to true to make the :raw option return ids after applying options to them. The deprecated behaviour is to return a CachedResult and ignore all options.


25
26
27
# File 'lib/arid_cache.rb', line 25

def self.raw_with_options=(value)
  @raw_with_options = value
end

.storeObject


49
50
51
# File 'lib/arid_cache.rb', line 49

def self.store
  AridCache::Store.instance
end

.versionObject


60
61
62
# File 'lib/arid_cache.rb', line 60

def self.version
  @version ||= File.read(File.join(File.dirname(__FILE__), '..', 'VERSION')).strip
end