cachetastic 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/classes/ActiveRecord/Base.html +188 -0
- data/doc/classes/CGI/Session/CachetasticStore.html +124 -0
- data/doc/classes/Cachetastic/Adapters/Base.html +331 -0
- data/doc/classes/Cachetastic/Adapters/Drb.html +332 -0
- data/doc/classes/Cachetastic/Adapters/File.html +248 -0
- data/doc/classes/Cachetastic/Adapters/FileBase.html +309 -0
- data/doc/classes/Cachetastic/Adapters/HtmlFile.html +224 -0
- data/doc/classes/Cachetastic/Adapters/LocalMemory.html +346 -0
- data/doc/classes/Cachetastic/Adapters/Memcache.html +498 -0
- data/doc/classes/Cachetastic/Cacheable.html +264 -0
- data/doc/classes/Cachetastic/Cacheable/ClassAndInstanceMethods.html +287 -0
- data/doc/classes/Cachetastic/Cacheable/ClassOnlyMethods.html +200 -0
- data/doc/classes/Cachetastic/Caches/Base.html +672 -0
- data/doc/classes/Cachetastic/Caches/Base/RegisteredCaches.html +179 -0
- data/doc/classes/Cachetastic/Caches/MackSessionCache.html +119 -0
- data/doc/classes/Cachetastic/Caches/PageCache.html +121 -0
- data/doc/classes/Cachetastic/Caches/RailsSessionCache.html +154 -0
- data/doc/classes/Cachetastic/Connection.html +212 -0
- data/doc/classes/Cachetastic/Errors/UnsupportedAdapter.html +146 -0
- data/doc/classes/Cachetastic/Logger.html +189 -0
- data/doc/classes/Object.html +152 -0
- data/doc/created.rid +1 -0
- data/doc/files/README.html +207 -0
- data/doc/files/lib/adapters/cachetastic_adapters_base_rb.html +139 -0
- data/doc/files/lib/adapters/cachetastic_adapters_drb_rb.html +115 -0
- data/doc/files/lib/adapters/cachetastic_adapters_file_base_rb.html +109 -0
- data/doc/files/lib/adapters/cachetastic_adapters_file_rb.html +121 -0
- data/doc/files/lib/adapters/cachetastic_adapters_html_file_rb.html +137 -0
- data/doc/files/lib/adapters/cachetastic_adapters_local_memory_rb.html +109 -0
- data/doc/files/lib/adapters/cachetastic_adapters_memcache_rb.html +127 -0
- data/doc/files/lib/adapters/cachetastic_adapters_store_object_rb.html +101 -0
- data/doc/files/lib/caches/cachetastic_caches_base_rb.html +108 -0
- data/doc/files/lib/caches/cachetastic_caches_mack_session_cache_rb.html +107 -0
- data/doc/files/lib/caches/cachetastic_caches_page_cache_rb.html +109 -0
- data/doc/files/lib/caches/cachetastic_caches_rails_session_cache_rb.html +107 -0
- data/doc/files/lib/cachetastic_cacheable_rb.html +101 -0
- data/doc/files/lib/cachetastic_connection_rb.html +107 -0
- data/doc/files/lib/cachetastic_logger_rb.html +107 -0
- data/doc/files/lib/cachetastic_rb.html +222 -0
- data/doc/files/lib/errors/cachetastic_errors_unsupported_adapter_rb.html +101 -0
- data/doc/files/lib/rails_extensions/cachetastic_active_record_base_rb.html +101 -0
- data/doc/files/lib/rails_extensions/cgi_session_cachetastic_store_rb.html +109 -0
- data/doc/files/lib/ruby_extensions/object_rb.html +101 -0
- data/doc/fr_class_index.html +47 -0
- data/doc/fr_file_index.html +47 -0
- data/doc/fr_method_index.html +100 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/cachetastic.rb +21 -23
- data/lib/cachetastic_cacheable.rb +202 -0
- data/lib/rails_extensions/cachetastic_active_record_base.rb +12 -39
- data/lib/ruby_extensions/object.rb +8 -0
- data/test/active_record_test.rb +8 -8
- data/test/cacheable_test.rb +72 -0
- metadata +52 -2
- data/lib/helpers/cachetastic_helpers_active_record.rb +0 -46
@@ -0,0 +1,212 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Cachetastic::Connection</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Cachetastic::Connection</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/cachetastic_connection_rb.html">
|
59
|
+
lib/cachetastic_connection.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
<a href="../Object.html">
|
69
|
+
Object
|
70
|
+
</a>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="contextContent">
|
82
|
+
|
83
|
+
<div id="description">
|
84
|
+
<p>
|
85
|
+
This class caches adapter objects for each cache in the system.
|
86
|
+
</p>
|
87
|
+
|
88
|
+
</div>
|
89
|
+
|
90
|
+
|
91
|
+
</div>
|
92
|
+
|
93
|
+
<div id="method-list">
|
94
|
+
<h3 class="section-bar">Methods</h3>
|
95
|
+
|
96
|
+
<div class="name-list">
|
97
|
+
<a href="#M000073">get</a>
|
98
|
+
<a href="#M000072">new</a>
|
99
|
+
</div>
|
100
|
+
</div>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
|
105
|
+
<!-- if includes -->
|
106
|
+
<div id="includes">
|
107
|
+
<h3 class="section-bar">Included Modules</h3>
|
108
|
+
|
109
|
+
<div id="includes-list">
|
110
|
+
<span class="include-name">Singleton</span>
|
111
|
+
</div>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
<div id="section">
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
<div id="attribute-list">
|
121
|
+
<h3 class="section-bar">Attributes</h3>
|
122
|
+
|
123
|
+
<div class="name-list">
|
124
|
+
<table>
|
125
|
+
<tr class="top-aligned-row context-row">
|
126
|
+
<td class="context-item-name">connections</td>
|
127
|
+
<td class="context-item-value"> [RW] </td>
|
128
|
+
<td class="context-item-desc"></td>
|
129
|
+
</tr>
|
130
|
+
</table>
|
131
|
+
</div>
|
132
|
+
</div>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
<!-- if method_list -->
|
137
|
+
<div id="methods">
|
138
|
+
<h3 class="section-bar">Public Class methods</h3>
|
139
|
+
|
140
|
+
<div id="method-M000072" class="method-detail">
|
141
|
+
<a name="M000072"></a>
|
142
|
+
|
143
|
+
<div class="method-heading">
|
144
|
+
<a href="#M000072" class="method-signature">
|
145
|
+
<span class="method-name">new</span><span class="method-args">()</span>
|
146
|
+
</a>
|
147
|
+
</div>
|
148
|
+
|
149
|
+
<div class="method-description">
|
150
|
+
<p><a class="source-toggle" href="#"
|
151
|
+
onclick="toggleCode('M000072-source');return false;">[Source]</a></p>
|
152
|
+
<div class="method-source-code" id="M000072-source">
|
153
|
+
<pre>
|
154
|
+
<span class="ruby-comment cmt"># File lib/cachetastic_connection.rb, line 7</span>
|
155
|
+
7: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
|
156
|
+
8: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">connections</span> = {}
|
157
|
+
9: <span class="ruby-keyword kw">end</span>
|
158
|
+
</pre>
|
159
|
+
</div>
|
160
|
+
</div>
|
161
|
+
</div>
|
162
|
+
|
163
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
164
|
+
|
165
|
+
<div id="method-M000073" class="method-detail">
|
166
|
+
<a name="M000073"></a>
|
167
|
+
|
168
|
+
<div class="method-heading">
|
169
|
+
<a href="#M000073" class="method-signature">
|
170
|
+
<span class="method-name">get</span><span class="method-args">(name)</span>
|
171
|
+
</a>
|
172
|
+
</div>
|
173
|
+
|
174
|
+
<div class="method-description">
|
175
|
+
<p>
|
176
|
+
Takes the name of the cache, that‘s been methodized, and returns back
|
177
|
+
the adapter object associated with the cache. If the adapter object
|
178
|
+
doesn‘t exist or if the adapter is no longer valid (adapter.valid?) a
|
179
|
+
<a href="Connection.html#M000072">new</a> one is created and returned.
|
180
|
+
</p>
|
181
|
+
<p><a class="source-toggle" href="#"
|
182
|
+
onclick="toggleCode('M000073-source');return false;">[Source]</a></p>
|
183
|
+
<div class="method-source-code" id="M000073-source">
|
184
|
+
<pre>
|
185
|
+
<span class="ruby-comment cmt"># File lib/cachetastic_connection.rb, line 14</span>
|
186
|
+
14: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">name</span>)
|
187
|
+
15: <span class="ruby-identifier">name</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_sym</span>
|
188
|
+
16: <span class="ruby-identifier">conn</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">connections</span>[<span class="ruby-identifier">name</span>]
|
189
|
+
17: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">conn</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">conn</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">conn</span>.<span class="ruby-identifier">valid?</span>
|
190
|
+
18: <span class="ruby-identifier">adapter</span> = <span class="ruby-constant">Cachetastic</span><span class="ruby-operator">::</span><span class="ruby-constant">Adapters</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">get_options</span>(<span class="ruby-identifier">name</span>)[<span class="ruby-value str">"adapter"</span>].<span class="ruby-identifier">camelcase</span>
|
191
|
+
19: <span class="ruby-identifier">conn</span> = <span class="ruby-node">"Cachetastic::Adapters::#{adapter}"</span>.<span class="ruby-identifier">constantize</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>)
|
192
|
+
20: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">connections</span>[<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">conn</span>
|
193
|
+
21: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">conn</span>
|
194
|
+
22: <span class="ruby-keyword kw">end</span>
|
195
|
+
</pre>
|
196
|
+
</div>
|
197
|
+
</div>
|
198
|
+
</div>
|
199
|
+
|
200
|
+
|
201
|
+
</div>
|
202
|
+
|
203
|
+
|
204
|
+
</div>
|
205
|
+
|
206
|
+
|
207
|
+
<div id="validator-badges">
|
208
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
209
|
+
</div>
|
210
|
+
|
211
|
+
</body>
|
212
|
+
</html>
|
@@ -0,0 +1,146 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Cachetastic::Errors::UnsupportedAdapter</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Cachetastic::Errors::UnsupportedAdapter</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../files/lib/errors/cachetastic_errors_unsupported_adapter_rb.html">
|
59
|
+
lib/errors/cachetastic_errors_unsupported_adapter.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Exception
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<div id="method-list">
|
86
|
+
<h3 class="section-bar">Methods</h3>
|
87
|
+
|
88
|
+
<div class="name-list">
|
89
|
+
<a href="#M000004">new</a>
|
90
|
+
</div>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
|
96
|
+
<!-- if includes -->
|
97
|
+
|
98
|
+
<div id="section">
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
<!-- if method_list -->
|
108
|
+
<div id="methods">
|
109
|
+
<h3 class="section-bar">Public Class methods</h3>
|
110
|
+
|
111
|
+
<div id="method-M000004" class="method-detail">
|
112
|
+
<a name="M000004"></a>
|
113
|
+
|
114
|
+
<div class="method-heading">
|
115
|
+
<a href="#M000004" class="method-signature">
|
116
|
+
<span class="method-name">new</span><span class="method-args">(cache_name, adapter)</span>
|
117
|
+
</a>
|
118
|
+
</div>
|
119
|
+
|
120
|
+
<div class="method-description">
|
121
|
+
<p><a class="source-toggle" href="#"
|
122
|
+
onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
|
123
|
+
<div class="method-source-code" id="M000004-source">
|
124
|
+
<pre>
|
125
|
+
<span class="ruby-comment cmt"># File lib/errors/cachetastic_errors_unsupported_adapter.rb, line 3</span>
|
126
|
+
3: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">cache_name</span>, <span class="ruby-identifier">adapter</span>)
|
127
|
+
4: <span class="ruby-keyword kw">super</span>(<span class="ruby-node">"#{cache_name} does not support the use of the #{adapter} adapter!"</span>)
|
128
|
+
5: <span class="ruby-keyword kw">end</span>
|
129
|
+
</pre>
|
130
|
+
</div>
|
131
|
+
</div>
|
132
|
+
</div>
|
133
|
+
|
134
|
+
|
135
|
+
</div>
|
136
|
+
|
137
|
+
|
138
|
+
</div>
|
139
|
+
|
140
|
+
|
141
|
+
<div id="validator-badges">
|
142
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
143
|
+
</div>
|
144
|
+
|
145
|
+
</body>
|
146
|
+
</html>
|
@@ -0,0 +1,189 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Cachetastic::Logger</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Cachetastic::Logger</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/cachetastic_logger_rb.html">
|
59
|
+
lib/cachetastic_logger.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
<a href="../Object.html">
|
69
|
+
Object
|
70
|
+
</a>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="contextContent">
|
82
|
+
|
83
|
+
<div id="description">
|
84
|
+
<p>
|
85
|
+
This class handles logging for the caches and their adapters.
|
86
|
+
</p>
|
87
|
+
|
88
|
+
</div>
|
89
|
+
|
90
|
+
|
91
|
+
</div>
|
92
|
+
|
93
|
+
<div id="method-list">
|
94
|
+
<h3 class="section-bar">Methods</h3>
|
95
|
+
|
96
|
+
<div class="name-list">
|
97
|
+
<a href="#M000074">new</a>
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
<!-- if includes -->
|
105
|
+
|
106
|
+
<div id="section">
|
107
|
+
|
108
|
+
|
109
|
+
<div id="constants-list">
|
110
|
+
<h3 class="section-bar">Constants</h3>
|
111
|
+
|
112
|
+
<div class="name-list">
|
113
|
+
<table summary="Constants">
|
114
|
+
<tr class="top-aligned-row context-row">
|
115
|
+
<td class="context-item-name">LOG_LEVELS</td>
|
116
|
+
<td>=</td>
|
117
|
+
<td class="context-item-value">[:fatal, :error, :warn, :info, :debug]</td>
|
118
|
+
</tr>
|
119
|
+
</table>
|
120
|
+
</div>
|
121
|
+
</div>
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
<div id="attribute-list">
|
126
|
+
<h3 class="section-bar">Attributes</h3>
|
127
|
+
|
128
|
+
<div class="name-list">
|
129
|
+
<table>
|
130
|
+
<tr class="top-aligned-row context-row">
|
131
|
+
<td class="context-item-name">cache_name</td>
|
132
|
+
<td class="context-item-value"> [RW] </td>
|
133
|
+
<td class="context-item-desc"></td>
|
134
|
+
</tr>
|
135
|
+
<tr class="top-aligned-row context-row">
|
136
|
+
<td class="context-item-name">options</td>
|
137
|
+
<td class="context-item-value"> [RW] </td>
|
138
|
+
<td class="context-item-desc"></td>
|
139
|
+
</tr>
|
140
|
+
</table>
|
141
|
+
</div>
|
142
|
+
</div>
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
<!-- if method_list -->
|
147
|
+
<div id="methods">
|
148
|
+
<h3 class="section-bar">Public Class methods</h3>
|
149
|
+
|
150
|
+
<div id="method-M000074" class="method-detail">
|
151
|
+
<a name="M000074"></a>
|
152
|
+
|
153
|
+
<div class="method-heading">
|
154
|
+
<a href="#M000074" class="method-signature">
|
155
|
+
<span class="method-name">new</span><span class="method-args">(options, cache_name)</span>
|
156
|
+
</a>
|
157
|
+
</div>
|
158
|
+
|
159
|
+
<div class="method-description">
|
160
|
+
<p><a class="source-toggle" href="#"
|
161
|
+
onclick="toggleCode('M000074-source');return false;">[Source]</a></p>
|
162
|
+
<div class="method-source-code" id="M000074-source">
|
163
|
+
<pre>
|
164
|
+
<span class="ruby-comment cmt"># File lib/cachetastic_logger.rb, line 7</span>
|
165
|
+
7: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>, <span class="ruby-identifier">cache_name</span>)
|
166
|
+
8: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">options</span> = <span class="ruby-identifier">options</span>
|
167
|
+
9: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">cache_name</span> = <span class="ruby-identifier">cache_name</span>
|
168
|
+
10: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">options</span>.<span class="ruby-identifier">each_pair</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">opts</span><span class="ruby-operator">|</span>
|
169
|
+
11: <span class="ruby-identifier">opts</span>[<span class="ruby-value str">"level"</span>] = (<span class="ruby-identifier">opts</span>[<span class="ruby-value str">"level"</span>] <span class="ruby-operator">||=</span> <span class="ruby-value str">"info"</span>).<span class="ruby-identifier">to_sym</span>
|
170
|
+
12: <span class="ruby-keyword kw">end</span>
|
171
|
+
13: <span class="ruby-keyword kw">end</span>
|
172
|
+
</pre>
|
173
|
+
</div>
|
174
|
+
</div>
|
175
|
+
</div>
|
176
|
+
|
177
|
+
|
178
|
+
</div>
|
179
|
+
|
180
|
+
|
181
|
+
</div>
|
182
|
+
|
183
|
+
|
184
|
+
<div id="validator-badges">
|
185
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
186
|
+
</div>
|
187
|
+
|
188
|
+
</body>
|
189
|
+
</html>
|