Home | Trees | Index | Help |
|
---|
|
object
--+
|
CacheItem
Method Summary | |
---|---|
Initialize an CacheItem object. | |
__cmp__(self,
other)
| |
datetime |
Update current status of the item and compute time of the next state change. |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Instance Variable Summary | |
---|---|
any hashable | address : item address. |
datetime |
expire_time : time when the object expires. |
datetime |
freshness_time : time when the object stops being fresh. |
datetime |
purge_time : time when the object should be purged. |
str |
state : current state. |
int |
state_value : numerical value of the current state (lower number means
fresher item). |
datetime |
timestamp : time when the object was created. |
instance |
value : item value (cached object). |
threading.RLock |
_lock : lock for thread safety. |
Class Variable Summary | |
---|---|
list |
__slots__ = ['value', 'address', 'state', 'timestamp', '...
|
Method Details |
---|
__init__(self,
address,
value,
freshness_period,
expiration_period,
purge_period,
state='new')
Initialize an CacheItem object. |
update_state(self)Update current status of the item and compute time of the next state change.
|
Instance Variable Details |
---|
addressitem address.
|
expire_timetime when the object expires.
|
freshness_timetime when the object stops being fresh.
|
purge_timetime when the object should be purged. When 0 then item will never be automaticaly purged.
|
statecurrent state.
|
state_valuenumerical value of the current state (lower number means fresher item).
|
timestamptime when the object was created.
|
valueitem value (cached object).
|
_locklock for thread safety.
|
Class Variable Details |
---|
__slots__
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Mon Dec 26 17:57:44 2005 | http://epydoc.sf.net |