Package Pyblosxom :: Package cache :: Module entryshelve :: Class BlosxomCache
[hide private]
[frames] | no frames]

Class BlosxomCache

source code

base.BlosxomCacheBase --+
                        |
                       BlosxomCache

This stores entries in shelves in a .dbm file.

Instance Methods [hide private]
 
__init__(self, req, config)
Initializes BlosxomCacheBase.__init__ and also opens the shelf file.
source code
 
load(self, entryid)
Loads a specific entryid.
source code
 
getEntry(self)
Get an entry from the shelf.
source code
boolean
isCached(self)
Returns true if the entry is cached and the cached version is not stale.
source code
 
saveEntry(self, entrydata)
Save data in the pickled file.
source code
 
rmEntry(self)
Removes an entry from the shelf.
source code
list of strings
keys(self)
Returns a list of entries that are cached in the shelf.
source code
 
close(self)
Closes the db file.
source code
    Inherited from base.BlosxomCacheBase
 
__delitem__(self, key)
Convenience function to make this look more like a dict.
source code
 
__getitem__(self, key)
Convenience function to make this class look like a dict.
source code
 
__setitem__(self, key, value)
Synonymous to saveEntry
source code
 
get(self, key, default=None)
Convenience function to make this look more like a dict.
source code
 
has_key(self, key)
Convenience function to make this look more like a dict.
source code
Instance Variables [hide private]
    Inherited from base.BlosxomCacheBase
string _config
String containing config on where to store the cache.
Method Details [hide private]

__init__(self, req, config)
(Constructor)

source code 
Initializes BlosxomCacheBase.__init__ and also opens the shelf file.
Overrides: base.BlosxomCacheBase.__init__

load(self, entryid)

source code 
Loads a specific entryid.
Overrides: base.BlosxomCacheBase.load

getEntry(self)

source code 
Get an entry from the shelf.
Overrides: base.BlosxomCacheBase.getEntry

isCached(self)

source code 
Returns true if the entry is cached and the cached version is not stale. Returns false otherwise.
Returns: boolean
0 or 1 based on cache
Overrides: base.BlosxomCacheBase.isCached

saveEntry(self, entrydata)

source code 
Save data in the pickled file.
Overrides: base.BlosxomCacheBase.saveEntry

rmEntry(self)

source code 
Removes an entry from the shelf.
Overrides: base.BlosxomCacheBase.rmEntry

keys(self)

source code 
Returns a list of entries that are cached in the shelf.
Returns: list of strings
list of entry paths
Overrides: base.BlosxomCacheBase.keys

close(self)

source code 
Closes the db file.
Overrides: base.BlosxomCacheBase.close