interfaces.py 667 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
from Interface import Interface

class ICache(Interface):
  """ Cache interace """

  def get(self, key, default=None):
    """ Get key from cache """

  def set(self, key, value, timeout=None):
    """ Set key to cache """

  def delete(self, key):
    """ Delete key from cache """

  def has_key(self, key):
    """ Returns True if the key is in the cache and has not expired """

  def getScopeList(self):
    """ get available user scopes """
    
  def getScopeKeyList(self, scope):
    """ get keys for cache scope """
            
  def clearCache(self):
    """ Clear whole cache """

  def clearCacheForScope(self, scope):
    """ Clear cache for scope """