Source code for pyams_cache.interfaces

#
# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#

__docformat__ = 'restructuredtext'


# import standard library

# import interfaces
from zope.interface import Interface

# import packages


[docs]class IBaseCacheHandler(Interface): """Base cache handler utility interface""" def open(self, server): """Get client for given server address""" def get(self, key, default=None): """Get given key from cache""" def set(self, key, value): """Store given value to cache"""
[docs]class ICacheHandler(IBaseCacheHandler): """Default cache handler interface"""
[docs]class IAioCacheHandler(IBaseCacheHandler): """AsyncIO cache handler interface"""