Module: JustimmoClient::Caching Private

Extended by:
Logging
Included in:
V1::JustimmoInterface
Defined in:
lib/justimmo_client/core/caching.rb

Overview

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

Caching support

Defined Under Namespace

Classes: NullCache

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Logging

default_logger, logger, rails_logger

Class Attribute Details

.cacheObject

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.

Returns the current cache



20
21
22
# File 'lib/justimmo_client/core/caching.rb', line 20

def cache
  @cache ||= default_cache
end

Class Method Details

.default_cacheObject

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.



28
29
30
31
32
# File 'lib/justimmo_client/core/caching.rb', line 28

def default_cache
  cache = JustimmoClient::Config.cache || NullCache.new
  log.debug("Using default cache #{cache.class}")
  cache
end

Instance Method Details

#cacheObject

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.



35
36
37
# File 'lib/justimmo_client/core/caching.rb', line 35

def cache
  JustimmoClient::Caching.cache
end