elephas 0.1.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -101,7 +101,7 @@
101
101
 
102
102
  <h2>Overview</h2><div class="docstring">
103
103
  <div class="discussion">
104
- <p>This represents a cache entry.</p>
104
+ <p>Represents a cache entry.</p>
105
105
 
106
106
 
107
107
  </div>
@@ -317,7 +317,30 @@
317
317
  <li class="public ">
318
318
  <span class="summary_signature">
319
319
 
320
- <a href="#initialize-instance_method" title="#initialize (instance method)">- (Entry) <strong>initialize</strong>(key, value, hash = nil, ttl = 3600) </a>
320
+ <a href="#%3D%3D-instance_method" title="#== (instance method)">- (Boolean) <strong>==</strong>(other) </a>
321
+
322
+
323
+
324
+ </span>
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+ <span class="summary_desc"><div class='inline'><p>Compare to another Entry.</p>
335
+ </div></span>
336
+
337
+ </li>
338
+
339
+
340
+ <li class="public ">
341
+ <span class="summary_signature">
342
+
343
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Entry) <strong>initialize</strong>(key, value, hash = nil, ttl = 360000) </a>
321
344
 
322
345
 
323
346
 
@@ -342,7 +365,7 @@
342
365
  <li class="public ">
343
366
  <span class="summary_signature">
344
367
 
345
- <a href="#refresh-instance_method" title="#refresh (instance method)">- (Object) <strong>refresh</strong>(save = false) </a>
368
+ <a href="#refresh-instance_method" title="#refresh (instance method)">- (Float) <strong>refresh</strong>(save = false) </a>
346
369
 
347
370
 
348
371
 
@@ -394,7 +417,7 @@
394
417
  <div class="method_details first">
395
418
  <h3 class="signature first" id="initialize-instance_method">
396
419
 
397
- - (<tt><span class='object_link'><a href="" title="Elephas::Entry (class)">Entry</a></span></tt>) <strong>initialize</strong>(key, value, hash = nil, ttl = 3600)
420
+ - (<tt><span class='object_link'><a href="" title="Elephas::Entry (class)">Entry</a></span></tt>) <strong>initialize</strong>(key, value, hash = nil, ttl = 360000)
398
421
 
399
422
 
400
423
 
@@ -466,7 +489,7 @@
466
489
  <span class='type'>(<tt>Integer</tt>)</span>
467
490
 
468
491
 
469
- <em class="default">(defaults to: <tt>3600</tt>)</em>
492
+ <em class="default">(defaults to: <tt>360000</tt>)</em>
470
493
 
471
494
 
472
495
  &mdash;
@@ -496,7 +519,7 @@
496
519
  <td>
497
520
  <pre class="code"><span class="info file"># File 'lib/elephas/entry.rb', line 31</span>
498
521
 
499
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_ttl'>ttl</span> <span class='op'>=</span> <span class='int'>3600</span><span class='rparen'>)</span>
522
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_ttl'>ttl</span> <span class='op'>=</span> <span class='int'>360000</span><span class='rparen'>)</span>
500
523
  <span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_hashify_key'>hashify_key</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
501
524
  <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span> <span class='op'>=</span> <span class='id identifier rubyid_key'>key</span>
502
525
  <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='id identifier rubyid_hash'>hash</span>
@@ -807,23 +830,23 @@
807
830
  <pre class="lines">
808
831
 
809
832
 
810
- 71
811
- 72
812
- 73
813
- 74
814
- 75
815
- 76
816
- 77
817
- 78
818
- 79
819
- 80
820
833
  81
821
834
  82
822
835
  83
823
- 84</pre>
836
+ 84
837
+ 85
838
+ 86
839
+ 87
840
+ 88
841
+ 89
842
+ 90
843
+ 91
844
+ 92
845
+ 93
846
+ 94</pre>
824
847
  </td>
825
848
  <td>
826
- <pre class="code"><span class="info file"># File 'lib/elephas/entry.rb', line 71</span>
849
+ <pre class="code"><span class="info file"># File 'lib/elephas/entry.rb', line 81</span>
827
850
 
828
851
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='kw'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
829
852
  <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
@@ -905,12 +928,12 @@
905
928
  <pre class="lines">
906
929
 
907
930
 
908
- 62
909
- 63
910
- 64</pre>
931
+ 72
932
+ 73
933
+ 74</pre>
911
934
  </td>
912
935
  <td>
913
- <pre class="code"><span class="info file"># File 'lib/elephas/entry.rb', line 62</span>
936
+ <pre class="code"><span class="info file"># File 'lib/elephas/entry.rb', line 72</span>
914
937
 
915
938
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_hashify_key'>hashify_key</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
916
939
  <span class='const'>Digest</span><span class='op'>::</span><span class='const'>SHA2</span><span class='period'>.</span><span class='id identifier rubyid_hexdigest'>hexdigest</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='rparen'>)</span>
@@ -927,9 +950,85 @@
927
950
 
928
951
 
929
952
  <div class="method_details first">
930
- <h3 class="signature first" id="refresh-instance_method">
953
+ <h3 class="signature first" id="==-instance_method">
931
954
 
932
- - (<tt>Object</tt>) <strong>refresh</strong>(save = false)
955
+ - (<tt>Boolean</tt>) <strong>==</strong>(other)
956
+
957
+
958
+
959
+
960
+
961
+ </h3><div class="docstring">
962
+ <div class="discussion">
963
+ <p>Compare to another Entry.</p>
964
+
965
+
966
+ </div>
967
+ </div>
968
+ <div class="tags">
969
+ <p class="tag_title">Parameters:</p>
970
+ <ul class="param">
971
+
972
+ <li>
973
+
974
+ <span class='name'>other</span>
975
+
976
+
977
+ <span class='type'>(<tt><span class='object_link'><a href="" title="Elephas::Entry (class)">Entry</a></span></tt>)</span>
978
+
979
+
980
+
981
+ &mdash;
982
+ <div class='inline'><p>The entry to compare with</p>
983
+ </div>
984
+
985
+ </li>
986
+
987
+ </ul>
988
+
989
+ <p class="tag_title">Returns:</p>
990
+ <ul class="return">
991
+
992
+ <li>
993
+
994
+
995
+ <span class='type'>(<tt>Boolean</tt>)</span>
996
+
997
+
998
+
999
+ &mdash;
1000
+ <div class='inline'><p><code>true</code> if the entries are the same, <code>false</code> otherwise.</p>
1001
+ </div>
1002
+
1003
+ </li>
1004
+
1005
+ </ul>
1006
+
1007
+ </div><table class="source_code">
1008
+ <tr>
1009
+ <td>
1010
+ <pre class="lines">
1011
+
1012
+
1013
+ 64
1014
+ 65
1015
+ 66</pre>
1016
+ </td>
1017
+ <td>
1018
+ <pre class="code"><span class="info file"># File 'lib/elephas/entry.rb', line 64</span>
1019
+
1020
+ <span class='kw'>def</span> <span class='op'>==</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
1021
+ <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Elephas</span><span class='op'>::</span><span class='const'>Entry</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='lbracket'>[</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_hash'>hash</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='lbracket'>[</span><span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_hash'>hash</span><span class='comma'>,</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='rbracket'>]</span>
1022
+ <span class='kw'>end</span></pre>
1023
+ </td>
1024
+ </tr>
1025
+ </table>
1026
+ </div>
1027
+
1028
+ <div class="method_details ">
1029
+ <h3 class="signature " id="refresh-instance_method">
1030
+
1031
+ - (<tt>Float</tt>) <strong>refresh</strong>(save = false)
933
1032
 
934
1033
 
935
1034
 
@@ -965,6 +1064,23 @@
965
1064
 
966
1065
  </ul>
967
1066
 
1067
+ <p class="tag_title">Returns:</p>
1068
+ <ul class="return">
1069
+
1070
+ <li>
1071
+
1072
+
1073
+ <span class='type'>(<tt>Float</tt>)</span>
1074
+
1075
+
1076
+
1077
+ &mdash;
1078
+ <div class='inline'><p>The new updated_at value.</p>
1079
+ </div>
1080
+
1081
+ </li>
1082
+
1083
+ </ul>
968
1084
 
969
1085
  </div><table class="source_code">
970
1086
  <tr>
@@ -972,20 +1088,22 @@
972
1088
  <pre class="lines">
973
1089
 
974
1090
 
975
- 43
976
1091
  44
977
1092
  45
978
1093
  46
979
- 47</pre>
1094
+ 47
1095
+ 48
1096
+ 49</pre>
980
1097
  </td>
981
1098
  <td>
982
- <pre class="code"><span class="info file"># File 'lib/elephas/entry.rb', line 43</span>
1099
+ <pre class="code"><span class="info file"># File 'lib/elephas/entry.rb', line 44</span>
983
1100
 
984
1101
  <span class='kw'>def</span> <span class='id identifier rubyid_refresh'>refresh</span><span class='lparen'>(</span><span class='id identifier rubyid_save'>save</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
985
1102
  <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_updated_at'>updated_at</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_to_f'>to_f</span>
986
1103
 
987
- <span class='comment'># TODO: Set this value in the cache
988
- </span><span class='kw'>end</span></pre>
1104
+ <span class='const'>Elephas</span><span class='op'>::</span><span class='const'>Cache</span><span class='period'>.</span><span class='id identifier rubyid_provider'>provider</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_hash'>hash</span><span class='comma'>,</span> <span class='kw'>self</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_save'>save</span>
1105
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_updated_at'>updated_at</span>
1106
+ <span class='kw'>end</span></pre>
989
1107
  </td>
990
1108
  </tr>
991
1109
  </table>
@@ -1054,17 +1172,17 @@
1054
1172
  <pre class="lines">
1055
1173
 
1056
1174
 
1057
- 53
1058
- 54
1059
1175
  55
1060
- 56</pre>
1176
+ 56
1177
+ 57
1178
+ 58</pre>
1061
1179
  </td>
1062
1180
  <td>
1063
- <pre class="code"><span class="info file"># File 'lib/elephas/entry.rb', line 53</span>
1181
+ <pre class="code"><span class="info file"># File 'lib/elephas/entry.rb', line 55</span>
1064
1182
 
1065
1183
  <span class='kw'>def</span> <span class='id identifier rubyid_valid?'>valid?</span><span class='lparen'>(</span><span class='id identifier rubyid_provider'>provider</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1066
1184
  <span class='id identifier rubyid_provider'>provider</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>Elephas</span><span class='op'>::</span><span class='const'>Cache</span><span class='period'>.</span><span class='id identifier rubyid_provider'>provider</span>
1067
- <span class='id identifier rubyid_provider'>provider</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span> <span class='op'>-</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_updated_at'>updated_at</span> <span class='op'>&lt;</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_ttl'>ttl</span>
1185
+ <span class='id identifier rubyid_provider'>provider</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span> <span class='op'>-</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_updated_at'>updated_at</span> <span class='op'>&lt;</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_ttl'>ttl</span> <span class='op'>/</span> <span class='int'>1000</span>
1068
1186
  <span class='kw'>end</span></pre>
1069
1187
  </td>
1070
1188
  </tr>
@@ -1076,7 +1194,7 @@
1076
1194
  </div>
1077
1195
 
1078
1196
  <div id="footer">
1079
- Generated on Sat Jul 28 14:29:52 2012 by
1197
+ Generated on Sun Jul 29 10:32:07 2012 by
1080
1198
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1081
1199
  0.8.2.1 (ruby-1.9.2).
1082
1200
  </div>
@@ -316,15 +316,15 @@
316
316
  <pre class="lines">
317
317
 
318
318
 
319
- 37
320
319
  38
321
- 39</pre>
320
+ 39
321
+ 40</pre>
322
322
  </td>
323
323
  <td>
324
- <pre class="code"><span class="info file"># File 'lib/elephas/provider.rb', line 37</span>
324
+ <pre class="code"><span class="info file"># File 'lib/elephas/provider.rb', line 38</span>
325
325
 
326
326
  <span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
327
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>A Elephas::Providers subclass should override this module.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
327
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>A Elephas::Providers subclass must override this method.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
328
328
  <span class='kw'>end</span></pre>
329
329
  </td>
330
330
  </tr>
@@ -405,15 +405,15 @@
405
405
  <pre class="lines">
406
406
 
407
407
 
408
- 45
409
408
  46
410
- 47</pre>
409
+ 47
410
+ 48</pre>
411
411
  </td>
412
412
  <td>
413
- <pre class="code"><span class="info file"># File 'lib/elephas/provider.rb', line 45</span>
413
+ <pre class="code"><span class="info file"># File 'lib/elephas/provider.rb', line 46</span>
414
414
 
415
415
  <span class='kw'>def</span> <span class='id identifier rubyid_exists?'>exists?</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
416
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>A Elephas::Providers subclass should override this module.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
416
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>A Elephas::Providers subclass must override this method.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
417
417
  <span class='kw'>end</span></pre>
418
418
  </td>
419
419
  </tr>
@@ -462,12 +462,12 @@
462
462
  <pre class="lines">
463
463
 
464
464
 
465
- 52
466
465
  53
467
- 54</pre>
466
+ 54
467
+ 55</pre>
468
468
  </td>
469
469
  <td>
470
- <pre class="code"><span class="info file"># File 'lib/elephas/provider.rb', line 52</span>
470
+ <pre class="code"><span class="info file"># File 'lib/elephas/provider.rb', line 53</span>
471
471
 
472
472
  <span class='kw'>def</span> <span class='id identifier rubyid_now'>now</span>
473
473
  <span class='op'>::</span><span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_to_f'>to_f</span>
@@ -559,7 +559,7 @@
559
559
  <pre class="code"><span class="info file"># File 'lib/elephas/provider.rb', line 19</span>
560
560
 
561
561
  <span class='kw'>def</span> <span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
562
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>A Elephas::Providers subclass should override this module.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
562
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>A Elephas::Providers subclass must override this method.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
563
563
  <span class='kw'>end</span></pre>
564
564
  </td>
565
565
  </tr>
@@ -611,7 +611,7 @@
611
611
 
612
612
 
613
613
  &mdash;
614
- <div class='inline'><p>The value to write. *<em>Setting a value to <code>nil</code> doesn&#39;t mean *deleting</em> the value.</p>
614
+ <div class='inline'><p>The value to write. Setting a value to <code>nil</code> <strong>doesn&#39;t</strong> mean <em>deleting</em> the value.</p>
615
615
  </div>
616
616
 
617
617
  </li>
@@ -628,7 +628,7 @@
628
628
 
629
629
 
630
630
  &mdash;
631
- <div class='inline'><p>A list of options for writing. @see Elephas::Cache.write</p>
631
+ <div class='inline'><p>A list of options for writing.</p>
632
632
  </div>
633
633
 
634
634
  </li>
@@ -666,21 +666,28 @@
666
666
 
667
667
  </ul>
668
668
 
669
+ <p class="tag_title">See Also:</p>
670
+ <ul class="see">
671
+
672
+ <li><span class='object_link'><a href="../Cache.html#setup_options-class_method" title="Elephas::Cache.setup_options (method)">Cache.setup_options</a></span></li>
673
+
674
+ </ul>
675
+
669
676
  </div><table class="source_code">
670
677
  <tr>
671
678
  <td>
672
679
  <pre class="lines">
673
680
 
674
681
 
675
- 29
676
682
  30
677
- 31</pre>
683
+ 31
684
+ 32</pre>
678
685
  </td>
679
686
  <td>
680
- <pre class="code"><span class="info file"># File 'lib/elephas/provider.rb', line 29</span>
687
+ <pre class="code"><span class="info file"># File 'lib/elephas/provider.rb', line 30</span>
681
688
 
682
689
  <span class='kw'>def</span> <span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
683
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>A Elephas::Providers subclass should override this module.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
690
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>A Elephas::Providers subclass must override this method.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
684
691
  <span class='kw'>end</span></pre>
685
692
  </td>
686
693
  </tr>
@@ -692,7 +699,7 @@
692
699
  </div>
693
700
 
694
701
  <div id="footer">
695
- Generated on Sat Jul 28 14:29:52 2012 by
702
+ Generated on Sun Jul 29 10:32:07 2012 by
696
703
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
697
704
  0.8.2.1 (ruby-1.9.2).
698
705
  </div>
@@ -472,15 +472,15 @@
472
472
  <pre class="lines">
473
473
 
474
474
 
475
- 48
476
475
  49
477
476
  50
478
477
  51
479
478
  52
480
- 53</pre>
479
+ 53
480
+ 54</pre>
481
481
  </td>
482
482
  <td>
483
- <pre class="code"><span class="info file"># File 'lib/elephas/providers/hash.rb', line 48</span>
483
+ <pre class="code"><span class="info file"># File 'lib/elephas/providers/hash.rb', line 49</span>
484
484
 
485
485
  <span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
486
486
  <span class='id identifier rubyid_fkey'>fkey</span> <span class='op'>=</span> <span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span>
@@ -554,13 +554,13 @@
554
554
  <pre class="lines">
555
555
 
556
556
 
557
- 59
558
557
  60
559
558
  61
560
- 62</pre>
559
+ 62
560
+ 63</pre>
561
561
  </td>
562
562
  <td>
563
- <pre class="code"><span class="info file"># File 'lib/elephas/providers/hash.rb', line 59</span>
563
+ <pre class="code"><span class="info file"># File 'lib/elephas/providers/hash.rb', line 60</span>
564
564
 
565
565
  <span class='kw'>def</span> <span class='id identifier rubyid_exists?'>exists?</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
566
566
  <span class='id identifier rubyid_fkey'>fkey</span> <span class='op'>=</span> <span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span>
@@ -692,7 +692,7 @@
692
692
 
693
693
 
694
694
  &mdash;
695
- <div class='inline'><p>The value to write. *<em>Setting a value to <code>nil</code> doesn&#39;t mean *deleting</em> the value.</p>
695
+ <div class='inline'><p>The value to write. Setting a value to <code>nil</code> <strong>doesn&#39;t</strong> mean <em>deleting</em> the value.</p>
696
696
  </div>
697
697
 
698
698
  </li>
@@ -709,7 +709,7 @@
709
709
 
710
710
 
711
711
  &mdash;
712
- <div class='inline'><p>A list of options for writing. @see Elephas::Cache.write</p>
712
+ <div class='inline'><p>A list of options for writing.</p>
713
713
  </div>
714
714
 
715
715
  </li>
@@ -734,21 +734,28 @@
734
734
 
735
735
  </ul>
736
736
 
737
+ <p class="tag_title">See Also:</p>
738
+ <ul class="see">
739
+
740
+ <li><span class='object_link'><a href="../Cache.html#setup_options-class_method" title="Elephas::Cache.setup_options (method)">Cache.setup_options</a></span></li>
741
+
742
+ </ul>
743
+
737
744
  </div><table class="source_code">
738
745
  <tr>
739
746
  <td>
740
747
  <pre class="lines">
741
748
 
742
749
 
743
- 37
744
750
  38
745
751
  39
746
752
  40
747
753
  41
748
- 42</pre>
754
+ 42
755
+ 43</pre>
749
756
  </td>
750
757
  <td>
751
- <pre class="code"><span class="info file"># File 'lib/elephas/providers/hash.rb', line 37</span>
758
+ <pre class="code"><span class="info file"># File 'lib/elephas/providers/hash.rb', line 38</span>
752
759
 
753
760
  <span class='kw'>def</span> <span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
754
761
  <span class='id identifier rubyid_fvalue'>fvalue</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>Elephas</span><span class='op'>::</span><span class='const'>Entry</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
@@ -766,7 +773,7 @@
766
773
  </div>
767
774
 
768
775
  <div id="footer">
769
- Generated on Sat Jul 28 14:29:52 2012 by
776
+ Generated on Sun Jul 29 10:32:08 2012 by
770
777
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
771
778
  0.8.2.1 (ruby-1.9.2).
772
779
  </div>
@@ -522,7 +522,7 @@
522
522
 
523
523
 
524
524
  &mdash;
525
- <div class='inline'><p>The value to write. *<em>Setting a value to <code>nil</code> doesn&#39;t mean *deleting</em> the value.</p>
525
+ <div class='inline'><p>The value to write. <strong>Setting a value to <code>nil</code> **doesn&#39;t</strong> mean <em>deleting</em> the value.</p>
526
526
  </div>
527
527
 
528
528
  </li>
@@ -539,7 +539,7 @@
539
539
 
540
540
 
541
541
  &mdash;
542
- <div class='inline'><p>A list of options for writing. @see Elephas::Cache.write</p>
542
+ <div class='inline'><p>A list of options for writing.</p>
543
543
  </div>
544
544
 
545
545
  </li>
@@ -564,13 +564,19 @@
564
564
 
565
565
  </ul>
566
566
 
567
+ <p class="tag_title">See Also:</p>
568
+ <ul class="see">
569
+
570
+ <li><span class='object_link'><a href="../Cache.html#setup_options-class_method" title="Elephas::Cache.setup_options (method)">Cache.setup_options</a></span></li>
571
+
572
+ </ul>
573
+
567
574
  </div><table class="source_code">
568
575
  <tr>
569
576
  <td>
570
577
  <pre class="lines">
571
578
 
572
579
 
573
- 27
574
580
  28
575
581
  29
576
582
  30
@@ -580,14 +586,13 @@
580
586
  34</pre>
581
587
  </td>
582
588
  <td>
583
- <pre class="code"><span class="info file"># File 'lib/elephas/providers/ruby_on_rails.rb', line 27</span>
589
+ <pre class="code"><span class="info file"># File 'lib/elephas/providers/ruby_on_rails.rb', line 28</span>
584
590
 
585
591
  <span class='kw'>def</span> <span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
586
- <span class='id identifier rubyid_ttl'>ttl</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:ttl</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span><span class='comma'>,</span> <span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_max'>max</span>
587
592
  <span class='id identifier rubyid_fvalue'>fvalue</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>Elephas</span><span class='op'>::</span><span class='const'>Entry</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
588
593
  <span class='id identifier rubyid_fvalue'>fvalue</span><span class='period'>.</span><span class='id identifier rubyid_refresh'>refresh</span>
589
594
 
590
- <span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_cache'>cache</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='symbol'>:expires_in</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_ttl'>ttl</span><span class='rparen'>)</span>
595
+ <span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_cache'>cache</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='symbol'>:expires_in</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_fvalue'>fvalue</span><span class='period'>.</span><span class='id identifier rubyid_ttl'>ttl</span><span class='rparen'>)</span>
591
596
  <span class='id identifier rubyid_value'>value</span>
592
597
  <span class='kw'>end</span></pre>
593
598
  </td>
@@ -600,7 +605,7 @@
600
605
  </div>
601
606
 
602
607
  <div id="footer">
603
- Generated on Sat Jul 28 14:29:52 2012 by
608
+ Generated on Sun Jul 29 10:32:08 2012 by
604
609
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
605
610
  0.8.2.1 (ruby-1.9.2).
606
611
  </div>
@@ -120,7 +120,7 @@
120
120
  </div>
121
121
 
122
122
  <div id="footer">
123
- Generated on Sat Jul 28 14:29:51 2012 by
123
+ Generated on Sun Jul 29 10:32:07 2012 by
124
124
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
125
125
  0.8.2.1 (ruby-1.9.2).
126
126
  </div>
@@ -119,7 +119,7 @@
119
119
 
120
120
  </div>
121
121
  </dt>
122
- <dd><pre class="code"><span class='int'>0</span></pre></dd>
122
+ <dd><pre class="code"><span class='int'>1</span></pre></dd>
123
123
 
124
124
  <dt id="MINOR-constant" class="">MINOR =
125
125
  <div class="docstring">
@@ -134,7 +134,7 @@
134
134
 
135
135
  </div>
136
136
  </dt>
137
- <dd><pre class="code"><span class='int'>1</span></pre></dd>
137
+ <dd><pre class="code"><span class='int'>0</span></pre></dd>
138
138
 
139
139
  <dt id="PATCH-constant" class="">PATCH =
140
140
  <div class="docstring">
@@ -180,7 +180,7 @@
180
180
  </div>
181
181
 
182
182
  <div id="footer">
183
- Generated on Sat Jul 28 14:29:51 2012 by
183
+ Generated on Sun Jul 29 10:32:07 2012 by
184
184
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
185
185
  0.8.2.1 (ruby-1.9.2).
186
186
  </div>