Table of Contents

Class: Cache projtls.py

General Data cache

Methods   
__call__
__init__
delete
  __call__ 
__call__ (
        self,
        operation,
        input,
        )

Call of cache object.

  • parameters:

    operation

    the real function to call if the result is not yet known. This should be a one-argument stateless function.

    input

    the result of operation(input) is requested.

  • Return value is the value of operation(input). If the result was in the cache, the routine operation is not called to get this result.

  __init__ 
__init__ ( self,  keep=5 )

Constructor.

keep

Number of results to cache

  delete 
delete ( self,  input )

Delete cache item.

  • parameters:

    input

    operation(input) should be removed from cache

  • No return value


Table of Contents

This document was automatically generated on Fri Jul 3 09:28:36 2009 by HappyDoc version WORKING