Class: Sequel::Plugins::QueryCache::DalliDriver

Inherits:
Driver
  • Object
show all
Defined in:
lib/sequel-query-cache/driver/dalli.rb

Instance Attribute Summary

Attributes inherited from Driver

#serializer, #store

Instance Method Summary collapse

Methods inherited from Driver

from_store, #get, #initialize, #set

Constructor Details

This class inherits a constructor from Sequel::Plugins::QueryCache::Driver

Instance Method Details

#del(key) ⇒ Object



5
6
7
# File 'lib/sequel-query-cache/driver/dalli.rb', line 5

def del(key)
  store.delete(key)
end

#expire(key, time) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/sequel-query-cache/driver/dalli.rb', line 9

def expire(key, time)
  if time > 0
    store.touch(key, time)
  else
    store.delete(key)
  end
end