Method: Scrivito::Configuration.second_level_cache=

Defined in:
lib/scrivito/configuration.rb

.second_level_cache=(cache_store) ⇒ Object

Sets the second level cache.

If it is set, then Scrivito will additionaly store its cache in both: the filesystem cache and the second level cache. Also Scrivito will search in the second level cache if searching in the filesystem cache returns no results. If the second level cache returns results, then the results will be store in the filesystem cache.

By default it is not set.

@example Use Memcached as the second level cache (https://rubygems.org/gems/dalli)

 Scrivito.configure do |config|
   config.second_level_cache = ActiveSupport::Cache::DalliStore.new("localhost", "server-downstairs.localnetwork:8229")
 end

Parameters:

  • cache_store (ActiveSupport::Cache::Store)

    cache store to be used as the second level cache



126
127
128
# File 'lib/scrivito/configuration.rb', line 126

def second_level_cache=(cache_store)
  CmsDataCache.second_level_cache = cache_store
end