Sha256: 47c51d10f7abc9573013f4a00e08fd851cd2a92b09ef0dde34cc665d667c1272
Contents?: true
Size: 442 Bytes
Versions: 19
Compression:
Stored size: 442 Bytes
Contents
class Sfn::Loader::MemcacheCache def initialize(options = {}) options = options.reverse_merge({:servers => ['127.0.0.1:11211'], :namespace => 'satisfaction', }) @m = MemCache.new(options.delete(:servers), options) end def put(url, response) return nil if response["ETag"].blank? @m[url.to_s] = Sfn::Loader::CacheRecord.new(url, response["ETag"], response.body) end def get(url) @m[url.to_s] end end
Version data entries
19 entries across 19 versions & 3 rubygems