|
|
None | __init__ (self, int capacity) |
| |
|
t.Mapping[str, t.Any] | __getstate__ (self) |
| |
|
None | __setstate__ (self, t.Mapping[str, t.Any] d) |
| |
|
t.Tuple[t.Any,...] | __getnewargs__ (self) |
| |
| "te.Self" | copy (self) |
| |
| t.Any | get (self, t.Any key, t.Any default=None) |
| |
| t.Any | setdefault (self, t.Any key, t.Any default=None) |
| |
| None | clear (self) |
| |
| bool | __contains__ (self, t.Any key) |
| |
| int | __len__ (self) |
| |
|
str | __repr__ (self) |
| |
| t.Any | __getitem__ (self, t.Any key) |
| |
| None | __setitem__ (self, t.Any key, t.Any value) |
| |
| None | __delitem__ (self, t.Any key) |
| |
| t.Iterable[t.Tuple[t.Any, t.Any]] | items (self) |
| |
| t.Iterable[t.Any] | values (self) |
| |
| t.Iterable[t.Any] | keys (self) |
| |
|
t.Iterator[t.Any] | __iter__ (self) |
| |
| t.Iterator[t.Any] | __reversed__ (self) |
| |
|
|
| _popleft |
| |
|
| _pop |
| |
|
| _remove |
| |
|
| _wlock |
| |
|
| _append |
| |
|
| _mapping |
| |
|
| _queue |
| |
A simple LRU Cache implementation.
◆ __contains__()
| bool jinja2.utils.LRUCache.__contains__ |
( |
|
self, |
|
|
t.Any |
key |
|
) |
| |
Check if a key exists in this cache.
◆ __delitem__()
| None jinja2.utils.LRUCache.__delitem__ |
( |
|
self, |
|
|
t.Any |
key |
|
) |
| |
Remove an item from the cache dict.
Raise a `KeyError` if it does not exist.
◆ __getitem__()
| t.Any jinja2.utils.LRUCache.__getitem__ |
( |
|
self, |
|
|
t.Any |
key |
|
) |
| |
Get an item from the cache. Moves the item up so that it has the
highest priority then.
Raise a `KeyError` if it does not exist.
◆ __len__()
| int jinja2.utils.LRUCache.__len__ |
( |
|
self | ) |
|
Return the current size of the cache.
◆ __reversed__()
| t.Iterator[t.Any] jinja2.utils.LRUCache.__reversed__ |
( |
|
self | ) |
|
Iterate over the keys in the cache dict, oldest items
coming first.
◆ __setitem__()
| None jinja2.utils.LRUCache.__setitem__ |
( |
|
self, |
|
|
t.Any |
key, |
|
|
t.Any |
value |
|
) |
| |
Sets the value for an item. Moves the item up so that it
has the highest priority then.
◆ clear()
| None jinja2.utils.LRUCache.clear |
( |
|
self | ) |
|
◆ copy()
| "te.Self" jinja2.utils.LRUCache.copy |
( |
|
self | ) |
|
Return a shallow copy of the instance.
◆ get()
| t.Any jinja2.utils.LRUCache.get |
( |
|
self, |
|
|
t.Any |
key, |
|
|
t.Any |
default = None |
|
) |
| |
Return an item from the cache dict or `default`
◆ items()
| t.Iterable[t.Tuple[t.Any, t.Any]] jinja2.utils.LRUCache.items |
( |
|
self | ) |
|
◆ keys()
| t.Iterable[t.Any] jinja2.utils.LRUCache.keys |
( |
|
self | ) |
|
Return a list of all keys ordered by most recent usage.
◆ setdefault()
| t.Any jinja2.utils.LRUCache.setdefault |
( |
|
self, |
|
|
t.Any |
key, |
|
|
t.Any |
default = None |
|
) |
| |
Set `default` if the key is not in the cache otherwise
leave unchanged. Return the value of this key.
◆ values()
| t.Iterable[t.Any] jinja2.utils.LRUCache.values |
( |
|
self | ) |
|
Return a list of all values.
The documentation for this class was generated from the following file:
- docs/help/help-venv/lib/python3.12/site-packages/jinja2/utils.py