MemoryCache#

class MemoryCache(copy=True)#

Bases: 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)

exists(key)

get(key)

get_all()

set(key, value)

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