Class: Ramaze::Cache::MemCache

Inherits:
Object
  • Object
show all
Defined in:
lib/cortex_reaver/snippets/ramaze/cache/memcached.rb

Instance Method Summary collapse

Instance Method Details

#cache_setup(host, user, app, name) ⇒ Object

I can’t figure out a good way to specify the parameters Ramaze::Cache uses when instantiating new caches, so I’m just going to override the setup here. Innate hardcodes the app name as “pristine”. :(



7
8
9
10
11
12
13
14
# File 'lib/cortex_reaver/snippets/ramaze/cache/memcached.rb', line 7

def cache_setup(host, user, app, name)
  app = Ramaze.options.app.name
  @namespace = [host, user, app, name].compact.join('-')
  options = {:namespace => @namespace}.merge(OPTIONS)
  servers = options.delete(:servers)
  @store = ::MemCache.new(servers, options)
  @warned = false
end