cache.py
Others:
Bases: dict
Defines the cache object and provides various methods to interact with its content.
Usage:
Initializes the class.
Parameters: | **kwargs (dict) – Key / Value pairs. |
---|
Adds given content to the cache.
Usage:
>>> cache = Cache()
>>> cache.addContent(John="Doe", Luke="Skywalker")
True
>>> cache
{'Luke': 'Skywalker', 'John': 'Doe'}
Parameters: | **content (**) – Content to add. |
---|---|
Returns: | Method success. |
Return type: | bool |
Removes given content from the cache.
Usage:
>>> cache = Cache()
>>> cache.addContent(John="Doe", Luke="Skywalker")
True
>>> cache.removeContent("Luke", "John")
True
>>> cache
{}
Parameters: | *keys (*) – Content to remove. |
---|---|
Returns: | Method success. |
Return type: | bool |