From 36568bc95c0b6b38ede6fde7adb7d4ee2863235f Mon Sep 17 00:00:00 2001 From: wookie184 Date: Tue, 11 Jun 2024 18:54:42 +0000 Subject: Deploying to docs from @ python-discord/bot-core@c17d29a38019ba05a65f1ba3cafa084d2dd76ec7 🚀 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/output/pydis_core.utils.caching.html | 91 ++++++++++++++++++++++++++----- 1 file changed, 77 insertions(+), 14 deletions(-) (limited to 'main/output/pydis_core.utils.caching.html') diff --git a/main/output/pydis_core.utils.caching.html b/main/output/pydis_core.utils.caching.html index 9d5ef348..4d1e6be0 100644 --- a/main/output/pydis_core.utils.caching.html +++ b/main/output/pydis_core.utils.caching.html @@ -5,10 +5,10 @@ - + caching - Pydis Core Latest (11.1.0) - + @@ -72,7 +72,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -87,7 +87,7 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> @@ -95,7 +95,7 @@ Auto light/dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow"> @@ -105,6 +105,60 @@ + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -116,6 +170,8 @@
Hide table of contents sidebar
+Skip to content +
@@ -133,7 +189,8 @@
@@ -374,11 +431,17 @@ Back to top
- +
@@ -388,20 +451,20 @@
-
+

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:
@@ -418,7 +481,7 @@
-__init__(max_size=128)[source]¶
+__init__(max_size=128)[source]¶

Initialise a new AsyncCache instance.

Parameters:
@@ -429,7 +492,7 @@
-clear()[source]¶
+clear()[source]¶

Clear cache instance.

Return type:
@@ -518,7 +581,7 @@
- + \ No newline at end of file -- cgit v1.2.3