Package zeroinstall :: Package injector :: Module distro :: Class Cache
[frames] | no frames]

Class Cache

source code

object --+
         |
        Cache

Instance Methods
 
__init__(self, cache_leaf, source, format)
Maintain a cache file (e.g.
source code
 
flush(self) source code
str
get(self, key) source code
 
put(self, key, value) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, cache_leaf, source, format)
(Constructor)

source code 

Maintain a cache file (e.g. ~/.cache/0install.net/injector/$name). If the size or mtime of $source has changed, or the cache format version if different, reset the cache first.

Parameters:
  • source (str)
  • cache_leaf (str)
  • format (int)
Overrides: object.__init__

get(self, key)

source code 
Parameters:
  • key (str)
Returns: str

put(self, key, value)

source code 
Parameters:
  • value (str)
  • key (str)