doc/classes/Cachetastic/Caches/Base.html in cachetastic-1.2.2 vs doc/classes/Cachetastic/Caches/Base.html in cachetastic-1.2.3
- old
+ new
@@ -116,21 +116,23 @@
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
- <a href="#M000040">adapter</a>
- <a href="#M000032">all_registered_caches</a>
- <a href="#M000039">cache_name</a>
- <a href="#M000042">calculate_expiry_time</a>
- <a href="#M000035">delete</a>
- <a href="#M000036">expire_all</a>
- <a href="#M000033">get</a>
- <a href="#M000041">logger</a>
- <a href="#M000037">populate_all</a>
- <a href="#M000034">set</a>
- <a href="#M000038">stats</a>
+ <a href="#M000048">adapter</a>
+ <a href="#M000051">adapter_supported?</a>
+ <a href="#M000040">all_registered_caches</a>
+ <a href="#M000047">cache_name</a>
+ <a href="#M000052">calculate_expiry_time</a>
+ <a href="#M000043">delete</a>
+ <a href="#M000044">expire_all</a>
+ <a href="#M000041">get</a>
+ <a href="#M000049">logger</a>
+ <a href="#M000045">populate_all</a>
+ <a href="#M000042">set</a>
+ <a href="#M000046">stats</a>
+ <a href="#M000050">unsupported_adapters</a>
</div>
</div>
</div>
@@ -167,16 +169,16 @@
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
- <div id="method-M000040" class="method-detail">
- <a name="M000040"></a>
+ <div id="method-M000048" class="method-detail">
+ <a name="M000048"></a>
<div class="method-heading">
- <a href="Base.src/M000040.html" target="Code" class="method-signature"
- onclick="popupCode('Base.src/M000040.html');return false;">
+ <a href="Base.src/M000048.html" target="Code" class="method-signature"
+ onclick="popupCode('Base.src/M000048.html');return false;">
<span class="method-name">adapter</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
@@ -186,16 +188,34 @@
cache.
</p>
</div>
</div>
- <div id="method-M000032" class="method-detail">
- <a name="M000032"></a>
+ <div id="method-M000051" class="method-detail">
+ <a name="M000051"></a>
<div class="method-heading">
- <a href="Base.src/M000032.html" target="Code" class="method-signature"
- onclick="popupCode('Base.src/M000032.html');return false;">
+ <a href="Base.src/M000051.html" target="Code" class="method-signature"
+ onclick="popupCode('Base.src/M000051.html');return false;">
+ <span class="method-name">adapter_supported?</span><span class="method-args">(a = cache_conn_instance.get(cache_name).class)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Returns true/false on whether the <a href="Base.html#M000048">adapter</a>
+you want to use is supported for the cache.
+</p>
+ </div>
+ </div>
+
+ <div id="method-M000040" class="method-detail">
+ <a name="M000040"></a>
+
+ <div class="method-heading">
+ <a href="Base.src/M000040.html" target="Code" class="method-signature"
+ onclick="popupCode('Base.src/M000040.html');return false;">
<span class="method-name">all_registered_caches</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
@@ -203,16 +223,16 @@
Returns a list of all registered caches in the system.
</p>
</div>
</div>
- <div id="method-M000039" class="method-detail">
- <a name="M000039"></a>
+ <div id="method-M000047" class="method-detail">
+ <a name="M000047"></a>
<div class="method-heading">
- <a href="Base.src/M000039.html" target="Code" class="method-signature"
- onclick="popupCode('Base.src/M000039.html');return false;">
+ <a href="Base.src/M000047.html" target="Code" class="method-signature"
+ onclick="popupCode('Base.src/M000047.html');return false;">
<span class="method-name">cache_name</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
@@ -226,36 +246,36 @@
Cachetastic::Caches::Base # => "cachetastic_caches_base"
</pre>
</div>
</div>
- <div id="method-M000035" class="method-detail">
- <a name="M000035"></a>
+ <div id="method-M000043" class="method-detail">
+ <a name="M000043"></a>
<div class="method-heading">
- <a href="Base.src/M000035.html" target="Code" class="method-signature"
- onclick="popupCode('Base.src/M000035.html');return false;">
+ <a href="Base.src/M000043.html" target="Code" class="method-signature"
+ onclick="popupCode('Base.src/M000043.html');return false;">
<span class="method-name">delete</span><span class="method-args">(key, delay = 0)</span>
</a>
</div>
<div class="method-description">
<p>
Deletes an object from the cache. The optional delay parameter sets an
offset, in seconds, for when the object should <a
-href="Base.html#M000033">get</a> deleted. The default of 0 means the object
+href="Base.html#M000041">get</a> deleted. The default of 0 means the object
gets deleted right away.
</p>
</div>
</div>
- <div id="method-M000036" class="method-detail">
- <a name="M000036"></a>
+ <div id="method-M000044" class="method-detail">
+ <a name="M000044"></a>
<div class="method-heading">
- <a href="Base.src/M000036.html" target="Code" class="method-signature"
- onclick="popupCode('Base.src/M000036.html');return false;">
+ <a href="Base.src/M000044.html" target="Code" class="method-signature"
+ onclick="popupCode('Base.src/M000044.html');return false;">
<span class="method-name">expire_all</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
@@ -263,37 +283,37 @@
Expires all objects for this cache.
</p>
</div>
</div>
- <div id="method-M000033" class="method-detail">
- <a name="M000033"></a>
+ <div id="method-M000041" class="method-detail">
+ <a name="M000041"></a>
<div class="method-heading">
- <a href="Base.src/M000033.html" target="Code" class="method-signature"
- onclick="popupCode('Base.src/M000033.html');return false;">
+ <a href="Base.src/M000041.html" target="Code" class="method-signature"
+ onclick="popupCode('Base.src/M000041.html');return false;">
<span class="method-name">get</span><span class="method-args">(key) {|key if block_given?| ...}</span>
</a>
</div>
<div class="method-description">
<p>
Returns an object from the cache for a given key. If the object comes back
as nil and a block is given that block will be run and the results of the
block will be run. This can be used to JIT caches, just make sure in the
-block to call the <a href="Base.html#M000034">set</a> method because the
+block to call the <a href="Base.html#M000042">set</a> method because the
results of the block are not automatically cached.
</p>
</div>
</div>
- <div id="method-M000041" class="method-detail">
- <a name="M000041"></a>
+ <div id="method-M000049" class="method-detail">
+ <a name="M000049"></a>
<div class="method-heading">
- <a href="Base.src/M000041.html" target="Code" class="method-signature"
- onclick="popupCode('Base.src/M000041.html');return false;">
+ <a href="Base.src/M000049.html" target="Code" class="method-signature"
+ onclick="popupCode('Base.src/M000049.html');return false;">
<span class="method-name">logger</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
@@ -302,16 +322,16 @@
underlying <a href="../Adapters/Base.html">Cachetastic::Adapters::Base</a>.
</p>
</div>
</div>
- <div id="method-M000037" class="method-detail">
- <a name="M000037"></a>
+ <div id="method-M000045" class="method-detail">
+ <a name="M000045"></a>
<div class="method-heading">
- <a href="Base.src/M000037.html" target="Code" class="method-signature"
- onclick="popupCode('Base.src/M000037.html');return false;">
+ <a href="Base.src/M000045.html" target="Code" class="method-signature"
+ onclick="popupCode('Base.src/M000045.html');return false;">
<span class="method-name">populate_all</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
@@ -321,40 +341,40 @@
should be in there.
</p>
</div>
</div>
- <div id="method-M000034" class="method-detail">
- <a name="M000034"></a>
+ <div id="method-M000042" class="method-detail">
+ <a name="M000042"></a>
<div class="method-heading">
- <a href="Base.src/M000034.html" target="Code" class="method-signature"
- onclick="popupCode('Base.src/M000034.html');return false;">
+ <a href="Base.src/M000042.html" target="Code" class="method-signature"
+ onclick="popupCode('Base.src/M000042.html');return false;">
<span class="method-name">set</span><span class="method-args">(key, value, expiry = (adapter.all_options["default_expiry"] || 0))</span>
</a>
</div>
<div class="method-description">
<p>
Set a particular object info the cache for the given key. An optional third
parameter sets the expiry time for the object in the cache. The default for
-this expiry is <a href="Base.html#M000034">set</a> as either 0, meaning it
+this expiry is <a href="Base.html#M000042">set</a> as either 0, meaning it
never expires, or if there‘s a default_expiry time <a
-href="Base.html#M000034">set</a> in the config file, that file will be
-used. If there is an expiry_swing <a href="Base.html#M000034">set</a> in
+href="Base.html#M000042">set</a> in the config file, that file will be
+used. If there is an expiry_swing <a href="Base.html#M000042">set</a> in
the config file it will be +/- to the expiry time. See also: <a
-href="Base.html#M000042">calculate_expiry_time</a>
+href="Base.html#M000052">calculate_expiry_time</a>
</p>
</div>
</div>
- <div id="method-M000038" class="method-detail">
- <a name="M000038"></a>
+ <div id="method-M000046" class="method-detail">
+ <a name="M000046"></a>
<div class="method-heading">
- <a href="Base.src/M000038.html" target="Code" class="method-signature"
- onclick="popupCode('Base.src/M000038.html');return false;">
+ <a href="Base.src/M000046.html" target="Code" class="method-signature"
+ onclick="popupCode('Base.src/M000046.html');return false;">
<span class="method-name">stats</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
@@ -363,25 +383,45 @@
href="../Adapters/Base.html">Cachetastic::Adapters::Base</a> for the cache.
</p>
</div>
</div>
+ <div id="method-M000050" class="method-detail">
+ <a name="M000050"></a>
+
+ <div class="method-heading">
+ <a href="Base.src/M000050.html" target="Code" class="method-signature"
+ onclick="popupCode('Base.src/M000050.html');return false;">
+ <span class="method-name">unsupported_adapters</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Returns an array of unsupported adapters for this cache. Defaults to an
+empty array which will let any <a href="Base.html#M000048">adapter</a> be
+used by the cache. Override in your specific cache to prevent certain
+adapters.
+</p>
+ </div>
+ </div>
+
<h3 class="section-bar">Private Class methods</h3>
- <div id="method-M000042" class="method-detail">
- <a name="M000042"></a>
+ <div id="method-M000052" class="method-detail">
+ <a name="M000052"></a>
<div class="method-heading">
- <a href="Base.src/M000042.html" target="Code" class="method-signature"
- onclick="popupCode('Base.src/M000042.html');return false;">
+ <a href="Base.src/M000052.html" target="Code" class="method-signature"
+ onclick="popupCode('Base.src/M000052.html');return false;">
<span class="method-name">calculate_expiry_time</span><span class="method-args">(expiry)</span>
</a>
</div>
<div class="method-description">
<p>
-If the expiry time is <a href="Base.html#M000034">set</a> to 60 minutes and
-the expiry_swing time is <a href="Base.html#M000034">set</a> to 15 minutes,
+If the expiry time is <a href="Base.html#M000042">set</a> to 60 minutes and
+the expiry_swing time is <a href="Base.html#M000042">set</a> to 15 minutes,
this method will return a number between 45 minutes and 75 minutes.
</p>
</div>
</div>
\ No newline at end of file