The `cache.Cache.add` method in Python is used to add a new key-value pair to the cache. It takes two arguments: the key and the value to be added. If the key already exists in the cache, the method will overwrite the existing value with the new value. If the cache is full and adding a new item would exceed its maximum capacity, the method will automatically evict the least recently used item from the cache before adding the new item.
Python Cache.add - 26 examples found. These are the top rated real world Python examples of cache.Cache.add extracted from open source projects. You can rate examples to help us improve the quality of examples.