### Home Classes Methods

### In Files

- lib/memcache.rb

### Parent

Object

### Methods

- ::new
- #[]
- #[]=
- #fallback=
- #include?
- #reset

### Class/Module Index

Quicksearch

- Memcache
- Memcache::Base
- Memcache::ClientError
- Memcache::ConnectionError
- Memcache::Error
- Memcache::LocalServer
- Memcache::Migration
- Memcache::NullServer
- Memcache::PGServer
- Memcache::Pool
- Memcache::Segmented
- Memcache::SegmentedNativeServer
- Memcache::SegmentedServer
- Memcache::Server
- Memcache::ServerError
- Object
- PGconn

No matching classes.

# Memcache::Pool

### Attributes

fallback[R]

### Public Class Methods

new() click to toggle source

    # File lib/memcache.rb, line 444
    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 458
    def [](scope)
      @cache_by_scope[scope.to_sym] || @cache_by_scope[fallback]
    end

[]=(scope, cache) click to toggle source

    # File lib/memcache.rb, line 462
    def []=(scope, cache)
      @cache_by_scope[scope.to_sym] = cache
    end

fallback=(scope) click to toggle source

    # File lib/memcache.rb, line 454
    def fallback=(scope)
      @fallback = scope.to_sym
    end

include?(scope) click to toggle source

    # File lib/memcache.rb, line 450
    def include?(scope)
      @cache_by_scope.include?(scope.to_sym)
    end

reset() click to toggle source

    # File lib/memcache.rb, line 466
    def reset
      @cache_by_scope.values.each {|c| c.reset}
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.