Back to index

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

List of all members.

Public Member Functions

def __init__
def getRaw
def parentGet
def get
def set
def __getitem__
def __repr__
def __delitem__

Public Attributes

 parent
 id

Private Attributes

 _reverse

Detailed Description

Definition at line 70 of file cache.py.


Constructor & Destructor Documentation

def wicked.cache.Cache.__init__ (   self,
  id_ = None,
  parent = None 
)

Definition at line 72 of file cache.py.

00072 
00073     def __init__(self, id_=None, parent=None):
00074         self.parent = parent
00075         self.id = id_
00076         self._reverse={}
00077         super(Cache, self).__init__()

Here is the caller graph for this function:


Member Function Documentation

def wicked.cache.Cache.__delitem__ (   self,
  key 
)
trickle up deletion

Definition at line 107 of file cache.py.

00107 
00108     def __delitem__(self, key):
00109         """
00110         trickle up deletion
00111         """
00112         uid = self.getRaw(key)
00113         self.parent.remove(key)
00114         
00115         super(Cache, self).__delitem__(key)
00116 
# @@ migrate to new name        

Here is the call graph for this function:

def wicked.cache.Cache.__getitem__ (   self,
  key 
)

Definition at line 96 of file cache.py.

00096 
00097     def __getitem__(self, key):
00098         retval = self.parentGet(key)
00099         if retval: return retval
00100         return self.getRaw(key)

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 101 of file cache.py.

00101 
00102     def __repr__(self):
00103         rep = super(Cache, self).__repr__()
00104         name = self.__class__.__name__
00105         name = "%s '%s'" %(name, self.id)
00106         return "%s %s" %(name, rep)

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

Definition at line 84 of file cache.py.

00084 
00085     def get(self, key, default=None):
00086         uid = super(Cache, self).get(key, default)
00087         return self.parentGet(uid, default)

Here is the call graph for this function:

def wicked.cache.Cache.getRaw (   self,
  key 
)

Definition at line 78 of file cache.py.

00078 
00079     def getRaw(self, key):
00080         return super(Cache, self).__getitem__(key)

Here is the call graph for this function:

Here is the caller graph for this function:

def wicked.cache.Cache.parentGet (   self,
  uid,
  default = None 
)

Definition at line 81 of file cache.py.

00081 
00082     def parentGet(self, uid, default=None):
00083         return self.parent.get(str(uid), default)

Here is the caller graph for this function:

def wicked.cache.Cache.set (   self,
  key,
  value 
)

Definition at line 88 of file cache.py.

00088 
00089     def set(self, key, value):
00090         slug, uid = key
00091         self[slug] = uid
00092         self._reverse[uid] = slug
00093         self.parent.set(uid, value)
00094         self._p_changed
00095         return value
        

Here is the caller graph for this function:


Member Data Documentation

Definition at line 75 of file cache.py.

Definition at line 74 of file cache.py.

Definition at line 73 of file cache.py.


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