cache.py
Others:
Bases: dict
This class defines the cache object and provides various methods to interact with its content.
Usage:
Parameters: | **kwargs – Key / Value pairs. ( Key / Value pairs ) |
---|
This method 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. ( Boolean ) |
This method 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. ( Boolean ) |