MemoryCache

class squirro.lib.nlp.utils.cache.MemoryCache(copy=True)

Bases: squirro.lib.nlp.utils.cache.Cache

A simplistic cache which stores objects in memory.

The copy parameter specifies whether objects within the cache should be copied to prevent modifying cached values from outside.

Methods Summary

delete(key)

rtype

None

exists(key)

rtype

bool

get(key)

rtype

Optional[Any]

get_all()

rtype

List[Tuple[str, Any]]

set(key, value)

rtype

None

Methods Documentation

delete(key)
Return type

None

exists(key)
Return type

bool

get(key)
Return type

Optional[Any]

get_all()
Return type

List[Tuple[str, Any]]

set(key, value)
Return type

None