Module trase.tools.pcs.cache

Functions

def clears_cache(func)

Clear cache after function call.

This decorator must be used for functions that modify data in the database, to ensure that cached values do not become expired. For instance, all functions that modify the traders hierarchy are decorated, so that expired traders trees are not used later in the session.

def uses_cache(func)

Use cached return value when available, call the function and store the result in PCS_CACHE otherwise.

Classes

class Cache

Object to store cached values and cache usage statistics.

Methods

def clear(self)