Class: Rack::Cache::Storage

### Home Classes Methods

### In Files

- lib/rack/cache/storage.rb

### Parent

Object

### Methods

- ::instance
- ::new
- #clear
- #resolve_entitystore_uri
- #resolve_metastore_uri

### Files

- CHANGES
- COPYING
- README
- TODO

### Class/Module Index

Quicksearch

- Rack
- Rack::Cache
- Rack::Cache::AppEngine
- Rack::Cache::AppEngine::MC
- Rack::Cache::AppEngine::MemCache
- Rack::Cache::CacheControl
- Rack::Cache::Context
- Rack::Cache::EntityStore
- Rack::Cache::EntityStore::DISK
- Rack::Cache::EntityStore::Dalli
- Rack::Cache::EntityStore::Disk
- Rack::Cache::EntityStore::FILE
- Rack::Cache::EntityStore::GAE
- Rack::Cache::EntityStore::GAECACHE
- Rack::Cache::EntityStore::GAEStore
- Rack::Cache::EntityStore::HEAP
- Rack::Cache::EntityStore::Heap
- Rack::Cache::EntityStore::MEM
- Rack::Cache::EntityStore::MemCacheBase
- Rack::Cache::EntityStore::MemCached
- Rack::Cache::Key
- Rack::Cache::MetaStore
- Rack::Cache::MetaStore::DISK
- Rack::Cache::MetaStore::Dalli
- Rack::Cache::MetaStore::Disk
- Rack::Cache::MetaStore::FILE
- Rack::Cache::MetaStore::GAE
- Rack::Cache::MetaStore::GAECACHE
- Rack::Cache::MetaStore::GAEStore
- Rack::Cache::MetaStore::HEAP
- Rack::Cache::MetaStore::Heap
- Rack::Cache::MetaStore::MEM
- Rack::Cache::MetaStore::MemCacheBase
- Rack::Cache::MetaStore::MemCached
- Rack::Cache::Options
- Rack::Cache::Request
- Rack::Cache::Response
- Rack::Cache::Storage

No matching classes.

# Rack::Cache::Storage

Maintains a collection of MetaStore and EntityStore instances keyed by URI. A single instance of this class can be used across a single process to ensure that only a single instance of a backing store is created per unique storage URI.

### Public Class Methods

instance() click to toggle source

    # File lib/rack/cache/storage.rb, line 57
    def self.instance
      @@singleton_instance
    end

new() click to toggle source

    # File lib/rack/cache/storage.rb, line 12
    def initialize
      @metastores = {}
      @entitystores = {}
    end

### Public Instance Methods

clear() click to toggle source

    # File lib/rack/cache/storage.rb, line 25
    def clear
      @metastores.clear
      @entitystores.clear
      nil
    end

resolve_entitystore_uri(uri) click to toggle source

    # File lib/rack/cache/storage.rb, line 21
    def resolve_entitystore_uri(uri)
      @entitystores[uri.to_s] ||= create_store(EntityStore, uri)
    end

resolve_metastore_uri(uri) click to toggle source

    # File lib/rack/cache/storage.rb, line 17
    def resolve_metastore_uri(uri)
      @metastores[uri.to_s] ||= create_store(MetaStore, uri)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.