cacher_mod module

Provides a Cacher class, for caching database tables from gdbm files

class cacher_mod.Database_cacher(max_entries)[source]

Bases: object

A Database Cache class, for caching database tables from key-value stores. The cache is LRU: We evict the Least Recently Used table when we need more room.

close()

Expire all entries from the cache

expire_all()[source]

Expire all entries from the cache

expire_down_to(down_to=None)[source]

Expire entries from the cache until we have < down_to entries

keys()[source]

Return a list of keys (filenames) in the cache

exception cacher_mod.Database_cacher_duplicate_error[source]

Bases: cacher_mod.Database_cacher_error

An exception for when we have a duplicate filename

exception cacher_mod.Database_cacher_error[source]

Bases: Exception

A generic exception for cacher errors

exception cacher_mod.Database_cacher_time_error[source]

Bases: cacher_mod.Database_cacher_error

An exception for when we have a timing problem