diff options
author | 2022-04-02 20:57:41 +0000 | |
---|---|---|
committer | 2022-04-02 20:57:41 +0000 | |
commit | bc97054b9f27985523823e1643b7a0d5febc8ee1 (patch) | |
tree | 9e3331500d3b404f4a1ec949bb2862289336f282 /output/botcore.utils.caching.html | |
parent | Deploying to docs from @ python-discord/bot-core@3732ccccbebf26da1678b24c1446... (diff) |
Deploying to docs from @ python-discord/bot-core@b31c793634113fc2e6213eb8597cef8423954a88 🚀
Diffstat (limited to 'output/botcore.utils.caching.html')
-rw-r--r-- | output/botcore.utils.caching.html | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/output/botcore.utils.caching.html b/output/botcore.utils.caching.html index e45111b9..2d116941 100644 --- a/output/botcore.utils.caching.html +++ b/output/botcore.utils.caching.html @@ -5,10 +5,10 @@ <meta name="color-scheme" content="light dark"><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" /> <link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="next" title="channel" href="botcore.utils.channel.html" /><link rel="prev" title="Utils" href="botcore.utils.html" /> - <link rel="shortcut icon" href="https://raw.githubusercontent.com/python-discord/branding/main/logos/logo_full/logo_full.min.svg"/><meta name="generator" content="sphinx-4.4.0, furo 2022.02.23"/> + <link rel="shortcut icon" href="https://raw.githubusercontent.com/python-discord/branding/main/logos/logo_full/logo_full.min.svg"/><meta name="generator" content="sphinx-4.5.0, furo 2022.03.04"/> <title>caching - Bot Core v5.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=3c656993158f05539f962c5cea52a5e6c184bb8c" /> + <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=935aa2abcc5c1da4283d1dc201fb1f0add16d23a" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?digest=25ceb02ed1c46dc30f2321ff83e92799f69dfdb9" /> <link rel="stylesheet" type="text/css" href="../_static/index.css" /> <link rel="stylesheet" type="text/css" href="../_static/logo.css" /> @@ -23,16 +23,18 @@ --color-api-name: var(--color-link); } - body[data-theme="dark"] { - --color-code-background: #202020; + @media not print { + body[data-theme="dark"] { + --color-code-background: #202020; --color-code-foreground: #d0d0d0; - } - @media (prefers-color-scheme: dark) { - body:not([data-theme="light"]) { - --color-code-background: #202020; + } + @media (prefers-color-scheme: dark) { + body:not([data-theme="light"]) { + --color-code-background: #202020; --color-code-foreground: #d0d0d0; + } } } </style></head> @@ -214,14 +216,14 @@ <p>Utilities related to custom caches.</p> <dl class="py class"> <dt class="sig sig-object py" id="botcore.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/3732ccccbebf26da1678b24c1446019dad079745/botcore/utils/caching.py#L8-L66"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.caching.AsyncCache" title="Permalink to this definition">#</a></dt> +<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/b31c793634113fc2e6213eb8597cef8423954a88/botcore/utils/caching.py#L8-L66"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.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.10)"><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="botcore.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/3732ccccbebf26da1678b24c1446019dad079745/botcore/utils/caching.py#L27-L62"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.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/b31c793634113fc2e6213eb8597cef8423954a88/botcore/utils/caching.py#L27-L62"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.caching.AsyncCache.__call__" title="Permalink to this definition">#</a></dt> <dd><p>Decorator for async cache.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> @@ -237,7 +239,7 @@ </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="botcore.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/3732ccccbebf26da1678b24c1446019dad079745/botcore/utils/caching.py#L17-L26"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.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/b31c793634113fc2e6213eb8597cef8423954a88/botcore/utils/caching.py#L17-L26"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.caching.AsyncCache.__init__" title="Permalink to this definition">#</a></dt> <dd><p>Initialise a new <a class="reference internal" href="#botcore.utils.caching.AsyncCache" title="botcore.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</dt> @@ -247,7 +249,7 @@ </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="botcore.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/3732ccccbebf26da1678b24c1446019dad079745/botcore/utils/caching.py#L63-L66"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.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/b31c793634113fc2e6213eb8597cef8423954a88/botcore/utils/caching.py#L63-L66"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#botcore.utils.caching.AsyncCache.clear" title="Permalink to this definition">#</a></dt> <dd><p>Clear cache instance.</p> <dl class="field-list simple"> <dt class="field-odd">Return type</dt> |