In Files

Parent

Memcache::Pool

Attributes

fallback[R]

Public Class Methods

new() click to toggle source
# File lib/memcache.rb, line 445
def initialize
  @cache_by_scope = {}
  @cache_by_scope[:default] = Memcache.new(:server => Memcache::LocalServer)
  @fallback = :default
end

Public Instance Methods

[](scope) click to toggle source
# File lib/memcache.rb, line 459
def [](scope)
  @cache_by_scope[scope.to_sym] || @cache_by_scope[fallback]
end
[]=(scope, cache) click to toggle source
# File lib/memcache.rb, line 463
def []=(scope, cache)
  @cache_by_scope[scope.to_sym] = cache
end
fallback=(scope) click to toggle source
# File lib/memcache.rb, line 455
def fallback=(scope)
  @fallback = scope.to_sym
end
include?(scope) click to toggle source
# File lib/memcache.rb, line 451
def include?(scope)
  @cache_by_scope.include?(scope.to_sym)
end
reset() click to toggle source
# File lib/memcache.rb, line 467
def reset
  @cache_by_scope.values.each {|c| c.reset}
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.