Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Private Attributes
wicked.cache.CacheStore Class Reference
Inheritance diagram for wicked.cache.CacheStore:
Inheritance graph
[legend]
Collaboration diagram for wicked.cache.CacheStore:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __repr__
def get
def set
def getCache
def remove

Public Attributes

 id
 field

Private Attributes

 _cache
 _p_changed

Detailed Description

basic persistent cache object

see cache.txt

Definition at line 26 of file cache.py.


Constructor & Destructor Documentation

def wicked.cache.CacheStore.__init__ (   self,
  id_ 
)

Definition at line 32 of file cache.py.

00032 
00033     def __init__(self, id_):
00034         self.id = id_
00035         super(CacheStore, self).__init__(self)
00036         self.field={}
00037         self._cache = OOBTree()

Here is the caller graph for this function:


Member Function Documentation

Definition at line 38 of file cache.py.

00038 
00039     def __repr__(self):
00040         name = self.__class__.__name__
00041         name = "%s '%s'" %(name, self.id)
00042         return "%s %s :: %s" %(name, self.field, [x for x in self._cache.items()])

def wicked.cache.CacheStore.get (   self,
  key,
  default = None 
)

Definition at line 43 of file cache.py.

00043 
00044     def get(self, key, default=None):
00045         return self._cache.get(key, default)

def wicked.cache.CacheStore.getCache (   self,
  key 
)

Definition at line 50 of file cache.py.

00050 
00051     def getCache(self, key):
00052         subcache = self.field.get(key, _marker)
00053         if subcache is _marker:
00054             cache = Cache(parent=self, id_=self.id)
00055             self.field[key] = cache
00056             subcache = self.field[key]
00057             self._p_changed
00058         return subcache
        
def wicked.cache.CacheStore.remove (   self,
  key 
)

Definition at line 59 of file cache.py.

00059 
00060     def remove(self, key):
00061         val = self._cache.get(key)
00062         if val:
00063             del self._cache[key]
00064             self._p_changed=True
00065             for name, fcache in self.field.items():
00066                 for slug, uid in fcache.items():
00067                     if uid==key:
00068                         del fcache[slug]
00069 
           
def wicked.cache.CacheStore.set (   self,
  key,
  value 
)

Definition at line 46 of file cache.py.

00046 
00047     def set(self, key, value):
00048         self._cache[key] = value
00049         self._p_changed

Here is the caller graph for this function:


Member Data Documentation

Definition at line 36 of file cache.py.

Definition at line 63 of file cache.py.

Definition at line 35 of file cache.py.

Definition at line 33 of file cache.py.


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