### Home Classes Methods

### In Files

- lib/memcache.rb

### Parent

Object

### Methods

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

### Files

- LICENSE
- README.rdoc

### 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 438
    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 452
    def [](scope)
      @cache_by_scope[scope.to_sym] || @cache_by_scope[fallback]
    end

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

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

fallback=(scope) click to toggle source

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

include?(scope) click to toggle source

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

reset() click to toggle source

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

[Validate]

Generated with the Darkfish Rdoc Generator 2.