Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Private Member Functions
plone.memoize.ram.RAMCacheAdapter Class Reference
Inheritance diagram for plone.memoize.ram.RAMCacheAdapter:
Inheritance graph
[legend]
Collaboration diagram for plone.memoize.ram.RAMCacheAdapter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __getitem__
def __setitem__
def get

Public Attributes

 ramcache
 globalkey

Private Member Functions

def _make_key

Detailed Description

Definition at line 140 of file ram.py.


Constructor & Destructor Documentation

def plone.memoize.ram.RAMCacheAdapter.__init__ (   self,
  ramcache,
  globalkey = '' 
)

Definition at line 141 of file ram.py.

00141 
00142     def __init__(self, ramcache, globalkey=''):
00143         self.ramcache = ramcache
00144         self.globalkey = globalkey

Here is the caller graph for this function:


Member Function Documentation

Definition at line 148 of file ram.py.

00148 
00149     def __getitem__(self, key):
00150         value = self.ramcache.query(self.globalkey,
00151                                     dict(key=self._make_key(key)),
00152                                     MARKER)
00153         if value is MARKER:
00154             raise KeyError(key)
00155         else:
00156             return value

Here is the call graph for this function:

Here is the caller graph for this function:

def plone.memoize.ram.RAMCacheAdapter.__setitem__ (   self,
  key,
  value 
)

Definition at line 157 of file ram.py.

00157 
00158     def __setitem__(self, key, value):
00159         self.ramcache.set(value,
00160                           self.globalkey,
00161                           dict(key=self._make_key(key)))

Here is the call graph for this function:

Here is the caller graph for this function:

def plone.memoize.ram.RAMCacheAdapter._make_key (   self,
  source 
) [private]

Definition at line 145 of file ram.py.

00145 
00146     def _make_key(self, source):
00147         return md5.new(source).digest()

Here is the caller graph for this function:

def plone.memoize.ram.AbstractDict.get (   self,
  key,
  default = None 
) [inherited]

Definition at line 115 of file ram.py.

00115 
00116     def get(self, key, default=None):
00117         try:
00118             return self.__getitem__(key)
00119         except KeyError:
00120             return default


Member Data Documentation

Definition at line 143 of file ram.py.

Definition at line 142 of file ram.py.


The documentation for this class was generated from the following file: