aboutsummaryrefslogtreecommitdiffstats
path: root/v10.0.0/output/pydis_core.utils.caching.html
diff options
context:
space:
mode:
Diffstat (limited to 'v10.0.0/output/pydis_core.utils.caching.html')
-rw-r--r--v10.0.0/output/pydis_core.utils.caching.html50
1 files changed, 27 insertions, 23 deletions
diff --git a/v10.0.0/output/pydis_core.utils.caching.html b/v10.0.0/output/pydis_core.utils.caching.html
index b196d5fc..1fab90e3 100644
--- a/v10.0.0/output/pydis_core.utils.caching.html
+++ b/v10.0.0/output/pydis_core.utils.caching.html
@@ -1,18 +1,18 @@
<!doctype html>
-<html class="no-js" lang="en">
+<html class="no-js" lang="en" data-content_root="../">
<head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="next" title="channel" href="pydis_core.utils.channel.html" /><link rel="prev" title="Utils" href="pydis_core.utils.html" />
- <link rel="shortcut icon" href="https://raw.githubusercontent.com/python-discord/branding/main/logos/logo_full/logo_full.min.svg"/><!-- Generated with Sphinx 7.0.1 and Furo 2023.05.20 -->
+ <link rel="shortcut icon" href="https://raw.githubusercontent.com/python-discord/branding/main/logos/logo_full/logo_full.min.svg"/><!-- Generated with Sphinx 7.2.6 and Furo 2023.09.10 -->
<title>caching - Pydis Core v10.0.0</title>
- <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
- <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=e6660623a769aa55fea372102b9bf3151b292993" />
- <link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" />
- <link rel="stylesheet" type="text/css" href="../_static/index.css" />
- <link rel="stylesheet" type="text/css" href="../_static/changelog.css" />
- <link rel="stylesheet" type="text/css" href="../_static/logo.css" />
+ <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a746c00c" />
+ <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=135e06be" />
+ <link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=36a5483c" />
+ <link rel="stylesheet" type="text/css" href="../_static/logo.css?v=41ebe54c" />
+ <link rel="stylesheet" type="text/css" href="../_static/changelog.css?v=117bb91a" />
+ <link rel="stylesheet" type="text/css" href="../_static/index.css?v=832e2368" />
@@ -356,6 +356,10 @@
</li>
<li class="toctree-l2 ">
+ <a class="version_link reference internal" href="../../v10.3.0/output/pydis_core.utils.caching.html">v10.3.0</a>
+ </li>
+
+ <li class="toctree-l2 ">
<a class="version_link reference internal" href="../../v10.2.0/output/pydis_core.utils.caching.html">v10.2.0</a>
</li>
@@ -423,25 +427,25 @@
</div>
<article role="main">
<section id="module-pydis_core.utils.caching">
-<span id="caching"></span><h1>caching<a class="headerlink" href="#module-pydis_core.utils.caching" title="Permalink to this heading">#</a></h1>
+<span id="caching"></span><h1>caching<a class="headerlink" href="#module-pydis_core.utils.caching" title="Link to this heading">#</a></h1>
<p>Utilities related to custom caches.</p>
<dl class="py class">
<dt class="sig sig-object py" id="pydis_core.utils.caching.AsyncCache">
-<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">AsyncCache</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">max_size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">128</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/b52f1ab731e2a55d08c0de64401721fc5034865c/pydis_core/utils/caching.py#L8-L66"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pydis_core.utils.caching.AsyncCache" title="Permalink to this definition">#</a></dt>
-<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.11)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
+<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">AsyncCache</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">max_size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">128</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/b52f1ab731e2a55d08c0de64401721fc5034865c/pydis_core/utils/caching.py#L8-L66"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pydis_core.utils.caching.AsyncCache" title="Link to this definition">#</a></dt>
+<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>LRU cache implementation for coroutines.</p>
<p>Once the cache exceeds the maximum size, keys are deleted in FIFO order.</p>
<p>An offset may be optionally provided to be applied to the coroutine’s arguments when creating the cache key.</p>
<dl class="py method">
<dt class="sig sig-object py" id="pydis_core.utils.caching.AsyncCache.__call__">
-<span class="sig-name descname"><span class="pre">__call__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">arg_offset</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/b52f1ab731e2a55d08c0de64401721fc5034865c/pydis_core/utils/caching.py#L27-L62"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pydis_core.utils.caching.AsyncCache.__call__" title="Permalink to this definition">#</a></dt>
+<span class="sig-name descname"><span class="pre">__call__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">arg_offset</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/b52f1ab731e2a55d08c0de64401721fc5034865c/pydis_core/utils/caching.py#L27-L62"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pydis_core.utils.caching.AsyncCache.__call__" title="Link to this definition">#</a></dt>
<dd><p>Decorator for async cache.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
-<dd class="field-odd"><p><strong>arg_offset</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.11)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – The offset for the position of the key argument.</p>
+<dd class="field-odd"><p><strong>arg_offset</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – The offset for the position of the key argument.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
-<dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Callable" title="(in Python v3.11)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Callable</span></code></a></p>
+<dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Callable" title="(in Python v3.12)"><code class="xref py py-data docutils literal notranslate"><span class="pre">Callable</span></code></a></p>
</dd>
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>A decorator to wrap the target function.</p>
@@ -451,22 +455,22 @@
<dl class="py method">
<dt class="sig sig-object py" id="pydis_core.utils.caching.AsyncCache.__init__">
-<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">max_size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">128</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/b52f1ab731e2a55d08c0de64401721fc5034865c/pydis_core/utils/caching.py#L17-L26"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pydis_core.utils.caching.AsyncCache.__init__" title="Permalink to this definition">#</a></dt>
+<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">max_size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">128</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/b52f1ab731e2a55d08c0de64401721fc5034865c/pydis_core/utils/caching.py#L17-L26"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pydis_core.utils.caching.AsyncCache.__init__" title="Link to this definition">#</a></dt>
<dd><p>Initialise a new <a class="reference internal" href="#pydis_core.utils.caching.AsyncCache" title="pydis_core.utils.caching.AsyncCache"><code class="xref py py-obj docutils literal notranslate"><span class="pre">AsyncCache</span></code></a> instance.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
-<dd class="field-odd"><p><strong>max_size</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.11)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – How many items to store in the cache.</p>
+<dd class="field-odd"><p><strong>max_size</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>) – How many items to store in the cache.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pydis_core.utils.caching.AsyncCache.clear">
-<span class="sig-name descname"><span class="pre">clear</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/b52f1ab731e2a55d08c0de64401721fc5034865c/pydis_core/utils/caching.py#L63-L66"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pydis_core.utils.caching.AsyncCache.clear" title="Permalink to this definition">#</a></dt>
+<span class="sig-name descname"><span class="pre">clear</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/python-discord/bot-core/blob/b52f1ab731e2a55d08c0de64401721fc5034865c/pydis_core/utils/caching.py#L63-L66"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pydis_core.utils.caching.AsyncCache.clear" title="Link to this definition">#</a></dt>
<dd><p>Clear cache instance.</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
-<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.11)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></a></p>
+<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.12)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></a></p>
</dd>
</dl>
</dd></dl>
@@ -548,10 +552,10 @@
</aside>
</div>
-</div><script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
- <script src="../_static/doctools.js"></script>
- <script src="../_static/sphinx_highlight.js"></script>
- <script src="../_static/scripts/furo.js"></script>
- <script src="../_static/changelog.js"></script>
+</div><script src="../_static/documentation_options.js?v=335988e4"></script>
+ <script src="../_static/doctools.js?v=888ff710"></script>
+ <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
+ <script src="../_static/scripts/furo.js?v=32e29ea5"></script>
+ <script src="../_static/changelog.js?v=11ff7913"></script>
</body>
</html> \ No newline at end of file