Current section

Files

Jump to
indieweb priv dist doc IndieWeb.Cache.html
Raw

priv/dist/doc/IndieWeb.Cache.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.19.3">
<title>IndieWeb.Cache — IndieWeb v0.0.31</title>
<link rel="stylesheet" href="dist/html-399e30b9b028e3059575.css" />
<link rel="canonical" href="https://hexdocs.pm/indieweb/IndieWeb.Cache.html" />
<script src="dist/sidebar_items-23b3c70799.js"></script>
<script async src="dist/html-399e30b9b028e3059575.js"></script>
</head>
<body data-type="modules">
<script>try { if(localStorage.getItem('night-mode')) document.body.className += ' night-mode'; } catch (e) { }</script>
<div class="main">
<button class="sidebar-button sidebar-toggle">
<span class="icon-menu" aria-hidden="true"></span>
<span class="sr-only">Toggle Sidebar</span>
</button>
<button class="sidebar-button night-mode-toggle">
<span class="icon-theme" aria-hidden="true"></span>
<span class="sr-only">Toggle Theme</span>
</button>
<section class="sidebar">
<a href="https://indieweb.org/" class="sidebar-projectLink">
<div class="sidebar-projectDetails">
<h1 class="sidebar-projectName">
IndieWeb </h1>
<h2 class="sidebar-projectVersion">
v0.0.31
</h2>
</div>
<img src="assets/logo.png" alt="IndieWeb" class="sidebar-projectImage">
</a>
<form class="sidebar-search" action="search.html">
<button type="submit" class="search-button">
<span class="icon-search" aria-hidden="true"></span>
</button>
<input name="q" type="text" id="search-list" class="search-input" placeholder="Search" aria-label="Search" autocomplete="off" />
</form>
<ul class="sidebar-listNav">
<li><a id="extras-list" href="#full-list">Pages</a></li>
<li><a id="modules-list" href="#full-list">Modules</a></li>
</ul>
<div class="gradient"></div>
<ul id="full-list" class="sidebar-fullList"></ul>
</section>
<section class="content">
<div class="content-outer">
<div id="content" class="content-inner">
<h1>
<small class="visible-xs">IndieWeb v0.0.31</small>
IndieWeb.Cache
<a href="https://git.jacky.wtf/indieweb/elixir" title="View Source" class="view-source" rel="help">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</h1>
<section id="moduledoc">
<p>Provides the generic interface for handling caching logic in Koype.</p>
<h2 id="module-configuration" class="section-heading">
<a href="#module-configuration" class="hover-link"><span class="icon-link" aria-hidden="true"></span></a>
Configuration
</h2>
<p>In order to change the underlying adapter used, set the <code class="inline">:cache_adapter</code> value to an
implementation of <a href="IndieWeb.Cache.Adapter.html"><code class="inline">IndieWeb.Cache.Adapter</code></a>. By default, <a href="https://hexdocs.pm/cachex/3.1.3/Cachex.html"><code class="inline">Cachex</code></a> by way of
<a href="IndieWeb.Cache.Adapters.Cachex.html"><code class="inline">IndieWeb.Cache.Adapters.Cachex</code></a> is used.</p>
</section>
<section id="summary" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#summary">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this section</span>
</a>
Summary
</h1>
<div class="summary-functions summary">
<h2>
<a href="#functions">Functions</a>
</h2>
<div class="summary-row">
<div class="summary-signature">
<a href="#adapter/0">adapter()</a>
</div>
<div class="summary-synopsis"><p>Obtains an implementation of a <a href="IndieWeb.Cache.Adapter.html"><code class="inline">IndieWeb.Cache.Adapter</code></a> module</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#delete/1">delete(key)</a>
</div>
<div class="summary-synopsis"><p>Removes the value of key <code class="inline">key</code> from the adapter</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#get/2">get(key, value \\ nil)</a>
</div>
<div class="summary-synopsis"><p>Fetches the value defined by <code class="inline">key</code> from the adapter; returning <code class="inline">value</code> if it doesn&#39;t exist</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#set/3">set(key, value, options \\ [])</a>
</div>
<div class="summary-synopsis"><p>Sets the key <code class="inline">key</code> with the value <code class="inline">value</code> to the adapter</p>
</div>
</div>
</div>
</section>
<section id="functions" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#functions">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this section</span>
</a>
Functions </h1>
<div class="functions-list">
<section class="detail" id="adapter/0">
<div class="detail-header">
<a href="#adapter/0" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature">adapter()</span>
<a href="https://git.jacky.wtf/indieweb/elixir" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>adapter() :: <a href="IndieWeb.Cache.Adapter.html#t:t/0">IndieWeb.Cache.Adapter.t</a>()</pre>
</div>
</div>
<section class="docstring">
<p>Obtains an implementation of a <a href="IndieWeb.Cache.Adapter.html"><code class="inline">IndieWeb.Cache.Adapter</code></a> module.</p>
</section>
</section>
<section class="detail" id="delete/1">
<div class="detail-header">
<a href="#delete/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature">delete(key)</span>
<a href="https://git.jacky.wtf/indieweb/elixir" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>delete(<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">binary</a>()) :: :ok | :error</pre>
</div>
</div>
<section class="docstring">
<p>Removes the value of key <code class="inline">key</code> from the adapter.</p>
</section>
</section>
<section class="detail" id="get/2">
<span id="get/1"></span>
<div class="detail-header">
<a href="#get/2" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature">get(key, value \\ nil)</span>
<a href="https://git.jacky.wtf/indieweb/elixir" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>get(<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">binary</a>(), <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">any</a>()) :: <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">any</a>()</pre>
</div>
</div>
<section class="docstring">
<p>Fetches the value defined by <code class="inline">key</code> from the adapter; returning <code class="inline">value</code> if it doesn&#39;t exist.</p>
</section>
</section>
<section class="detail" id="set/3">
<span id="set/2"></span>
<div class="detail-header">
<a href="#set/3" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature">set(key, value, options \\ [])</span>
<a href="https://git.jacky.wtf/indieweb/elixir" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>set(<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">binary</a>(), <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">any</a>(), <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">keyword</a>()) :: :ok | :error</pre>
</div>
</div>
<section class="docstring">
<p>Sets the key <code class="inline">key</code> with the value <code class="inline">value</code> to the adapter.</p>
</section>
</section>
</div>
</section>
<footer class="footer">
<p>
<span class="line">
Built using
<a href="https://github.com/elixir-lang/ex_doc" title="ExDoc" target="_blank" rel="help noopener">ExDoc</a> (v0.19.3),
</span>
<span class="line">
designed by
<a href="https://twitter.com/dignifiedquire" target="_blank" rel="noopener" title="@dignifiedquire">Friedel Ziegelmayer</a>.
</span>
</p>
</footer>
</div>
</div>
</section>
</div>
</body>
</html>