<!-- Source: https://docs.squirro.com/en/latest/api/squirro.lib.nlp.utils.cache.MemoryCache.html -->
# MemoryCache

**`class MemoryCache(copy=True)`**

Bases: [`Cache`](squirro.lib.nlp.utils.cache.Cache.md#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 SummaryMethods Documentation

**`delete(key)`**

Return type

[`None`](https://docs.python.org/3.11/library/constants.html#None)

**`exists(key)`**

Return type

[`bool`](https://docs.python.org/3.11/library/functions.html#bool)

**`get(key)`**

Return type

[`Optional`](https://docs.python.org/3.11/library/typing.html#typing.Optional)[[`Any`](https://docs.python.org/3.11/library/typing.html#typing.Any)]

**`get_all()`**

Return type

[`list`](https://docs.python.org/3.11/library/stdtypes.html#list)[[`tuple`](https://docs.python.org/3.11/library/stdtypes.html#tuple)[[`str`](https://docs.python.org/3.11/library/stdtypes.html#str), [`Any`](https://docs.python.org/3.11/library/typing.html#typing.Any)]]

**`set(key, value)`**

Return type

[`None`](https://docs.python.org/3.11/library/constants.html#None)
