Class: Rack::Cache::EntityStore::GAEStore

### Home Classes Methods

### In Files

- lib/rack/cache/entitystore.rb

### Parent

Rack::Cache::EntityStore

### Methods

- ::new
- ::resolve
- #exist?
- #open
- #purge
- #read
- #write

### 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::EntityStore::GAEStore

### Attributes

cache[R]

### Public Class Methods

new(options = {}) click to toggle source

    # File lib/rack/cache/entitystore.rb, line 297
    def initialize(options = {})
      require 'rack/cache/appengine'
      @cache = Rack::Cache::AppEngine::MemCache.new(options)
    end

resolve(uri) click to toggle source

    # File lib/rack/cache/entitystore.rb, line 330
    def self.resolve(uri)
      self.new(:namespace => uri.host)
    end

### Public Instance Methods

exist?(key) click to toggle source

    # File lib/rack/cache/entitystore.rb, line 302
    def exist?(key)
      cache.contains?(key)
    end

open(key) click to toggle source

    # File lib/rack/cache/entitystore.rb, line 310
    def open(key)
      if data = read(key)
        [data]
      else
        nil
      end
    end

purge(key) click to toggle source

    # File lib/rack/cache/entitystore.rb, line 325
    def purge(key)
      cache.delete(key)
      nil
    end

read(key) click to toggle source

    # File lib/rack/cache/entitystore.rb, line 306
    def read(key)
      cache.get(key)
    end

write(body, ttl=nil) click to toggle source

    # File lib/rack/cache/entitystore.rb, line 318
    def write(body, ttl=nil)
      buf = StringIO.new
      key, size = slurp(body){|part| buf.write(part) }
      cache.put(key, buf.string, ttl)
      [key, size]
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.