-

caching#

+

caching¶

Utilities related to custom caches.

-class AsyncCache(max_size=128)[source]#
+class AsyncCache(max_size=128)[source]¶

Bases: object

LRU cache implementation for coroutines.

Once the cache exceeds the maximum size, keys are deleted in FIFO order.

An offset may be optionally provided to be applied to the coroutine’s arguments when creating the cache key.

-__call__(arg_offset=0)[source]#
+__call__(arg_offset=0)[source]¶

Decorator for async cache.

Parameters:
@@ -407,7 +407,7 @@
-__init__(max_size=128)[source]#
+__init__(max_size=128)[source]¶

Initialise a new AsyncCache instance.

Parameters:
@@ -418,7 +418,7 @@
-clear()[source]#
+clear()[source]¶

Clear cache instance.

Return type:
@@ -505,7 +505,7 @@ - + -- cgit v1.2.3