mack-caching 0.7.0.1 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/doc/classes/Mack/Controller/ClassMethods.html +6 -6
- data/doc/classes/Mack/SessionStore.html +111 -0
- data/doc/classes/Mack/SessionStore/Cachetastic.html +218 -0
- data/doc/created.rid +1 -1
- data/doc/files/README.html +1 -1
- data/doc/files/lib/mack-caching/errors_rb.html +1 -1
- data/doc/files/lib/mack-caching/page_caching/controller_extensions_rb.html +1 -1
- data/doc/files/lib/mack-caching/page_caching/page_caching_rb.html +1 -1
- data/doc/files/lib/mack-caching/sessions/cachetastic_session_store_rb.html +101 -0
- data/doc/files/lib/mack-caching_rb.html +1 -1
- data/doc/files/lib/mack-caching_tasks_rb.html +107 -0
- data/doc/fr_class_index.html +2 -0
- data/doc/fr_file_index.html +2 -0
- data/doc/fr_method_index.html +5 -1
- data/lib/mack-caching.rb +37 -3
- data/lib/mack-caching/sessions/cachetastic_session_store.rb +27 -0
- data/lib/mack-caching/tasks/cachetastic.rake +55 -0
- data/lib/mack-caching_tasks.rb +4 -0
- metadata +19 -4
@@ -80,7 +80,7 @@
|
|
80
80
|
<h3 class="section-bar">Methods</h3>
|
81
81
|
|
82
82
|
<div class="name-list">
|
83
|
-
<a href="#
|
83
|
+
<a href="#M000005">cache_pages</a>
|
84
84
|
</div>
|
85
85
|
</div>
|
86
86
|
|
@@ -102,11 +102,11 @@
|
|
102
102
|
<div id="methods">
|
103
103
|
<h3 class="section-bar">Public Instance methods</h3>
|
104
104
|
|
105
|
-
<div id="method-
|
106
|
-
<a name="
|
105
|
+
<div id="method-M000005" class="method-detail">
|
106
|
+
<a name="M000005"></a>
|
107
107
|
|
108
108
|
<div class="method-heading">
|
109
|
-
<a href="#
|
109
|
+
<a href="#M000005" class="method-signature">
|
110
110
|
<span class="method-name">cache_pages</span><span class="method-args">(options = {})</span>
|
111
111
|
</a>
|
112
112
|
</div>
|
@@ -124,8 +124,8 @@ Examples:
|
|
124
124
|
cache_pages :except => [:delete] # => will cache all pages except for the delete page for a controller
|
125
125
|
</pre>
|
126
126
|
<p><a class="source-toggle" href="#"
|
127
|
-
onclick="toggleCode('
|
128
|
-
<div class="method-source-code" id="
|
127
|
+
onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
|
128
|
+
<div class="method-source-code" id="M000005-source">
|
129
129
|
<pre>
|
130
130
|
<span class="ruby-comment cmt"># File lib/mack-caching/page_caching/controller_extensions.rb, line 13</span>
|
131
131
|
13: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache_pages</span>(<span class="ruby-identifier">options</span> = {})
|
@@ -0,0 +1,111 @@
|
|
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>Module: Mack::SessionStore</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>Module</strong></td>
|
53
|
+
<td class="class-name-in-header">Mack::SessionStore</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/mack-caching/sessions/cachetastic_session_store_rb.html">
|
59
|
+
lib/mack-caching/sessions/cachetastic_session_store.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
</table>
|
66
|
+
</div>
|
67
|
+
<!-- banner header -->
|
68
|
+
|
69
|
+
<div id="bodyContent">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<div id="contextContent">
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
</div>
|
78
|
+
|
79
|
+
|
80
|
+
</div>
|
81
|
+
|
82
|
+
|
83
|
+
<!-- if includes -->
|
84
|
+
|
85
|
+
<div id="section">
|
86
|
+
|
87
|
+
<div id="class-list">
|
88
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
89
|
+
|
90
|
+
Class <a href="SessionStore/Cachetastic.html" class="link">Mack::SessionStore::Cachetastic</a><br />
|
91
|
+
|
92
|
+
</div>
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<!-- if method_list -->
|
101
|
+
|
102
|
+
|
103
|
+
</div>
|
104
|
+
|
105
|
+
|
106
|
+
<div id="validator-badges">
|
107
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
108
|
+
</div>
|
109
|
+
|
110
|
+
</body>
|
111
|
+
</html>
|
@@ -0,0 +1,218 @@
|
|
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: Mack::SessionStore::Cachetastic</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">Mack::SessionStore::Cachetastic</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../files/lib/mack-caching/sessions/cachetastic_session_store_rb.html">
|
59
|
+
lib/mack-caching/sessions/cachetastic_session_store.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
|
+
Mack::SessionStore::Base
|
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="#M000003">expire</a>
|
90
|
+
<a href="#M000004">expire_all</a>
|
91
|
+
<a href="#M000001">get</a>
|
92
|
+
<a href="#M000002">set</a>
|
93
|
+
</div>
|
94
|
+
</div>
|
95
|
+
|
96
|
+
</div>
|
97
|
+
|
98
|
+
|
99
|
+
<!-- if includes -->
|
100
|
+
|
101
|
+
<div id="section">
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
<!-- if method_list -->
|
111
|
+
<div id="methods">
|
112
|
+
<h3 class="section-bar">Public Class methods</h3>
|
113
|
+
|
114
|
+
<div id="method-M000003" class="method-detail">
|
115
|
+
<a name="M000003"></a>
|
116
|
+
|
117
|
+
<div class="method-heading">
|
118
|
+
<a href="#M000003" class="method-signature">
|
119
|
+
<span class="method-name">expire</span><span class="method-args">(id, *args)</span>
|
120
|
+
</a>
|
121
|
+
</div>
|
122
|
+
|
123
|
+
<div class="method-description">
|
124
|
+
<p><a class="source-toggle" href="#"
|
125
|
+
onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
|
126
|
+
<div class="method-source-code" id="M000003-source">
|
127
|
+
<pre>
|
128
|
+
<span class="ruby-comment cmt"># File lib/mack-caching/sessions/cachetastic_session_store.rb, line 15</span>
|
129
|
+
15: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">expire</span>(<span class="ruby-identifier">id</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
130
|
+
16: <span class="ruby-operator">::</span><span class="ruby-constant">Cachetastic</span><span class="ruby-operator">::</span><span class="ruby-constant">Caches</span><span class="ruby-operator">::</span><span class="ruby-constant">MackSessionCache</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">id</span>)
|
131
|
+
17: <span class="ruby-keyword kw">end</span>
|
132
|
+
</pre>
|
133
|
+
</div>
|
134
|
+
</div>
|
135
|
+
</div>
|
136
|
+
|
137
|
+
<div id="method-M000004" class="method-detail">
|
138
|
+
<a name="M000004"></a>
|
139
|
+
|
140
|
+
<div class="method-heading">
|
141
|
+
<a href="#M000004" class="method-signature">
|
142
|
+
<span class="method-name">expire_all</span><span class="method-args">()</span>
|
143
|
+
</a>
|
144
|
+
</div>
|
145
|
+
|
146
|
+
<div class="method-description">
|
147
|
+
<p><a class="source-toggle" href="#"
|
148
|
+
onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
|
149
|
+
<div class="method-source-code" id="M000004-source">
|
150
|
+
<pre>
|
151
|
+
<span class="ruby-comment cmt"># File lib/mack-caching/sessions/cachetastic_session_store.rb, line 19</span>
|
152
|
+
19: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">expire_all</span>
|
153
|
+
20: <span class="ruby-operator">::</span><span class="ruby-constant">Cachetastic</span><span class="ruby-operator">::</span><span class="ruby-constant">Caches</span><span class="ruby-operator">::</span><span class="ruby-constant">MackSessionCache</span>.<span class="ruby-identifier">expire_all</span>
|
154
|
+
21: <span class="ruby-keyword kw">end</span>
|
155
|
+
</pre>
|
156
|
+
</div>
|
157
|
+
</div>
|
158
|
+
</div>
|
159
|
+
|
160
|
+
<div id="method-M000001" class="method-detail">
|
161
|
+
<a name="M000001"></a>
|
162
|
+
|
163
|
+
<div class="method-heading">
|
164
|
+
<a href="#M000001" class="method-signature">
|
165
|
+
<span class="method-name">get</span><span class="method-args">(id, request, response, cookies)</span>
|
166
|
+
</a>
|
167
|
+
</div>
|
168
|
+
|
169
|
+
<div class="method-description">
|
170
|
+
<p><a class="source-toggle" href="#"
|
171
|
+
onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
|
172
|
+
<div class="method-source-code" id="M000001-source">
|
173
|
+
<pre>
|
174
|
+
<span class="ruby-comment cmt"># File lib/mack-caching/sessions/cachetastic_session_store.rb, line 7</span>
|
175
|
+
7: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">id</span>, <span class="ruby-identifier">request</span>, <span class="ruby-identifier">response</span>, <span class="ruby-identifier">cookies</span>)
|
176
|
+
8: <span class="ruby-operator">::</span><span class="ruby-constant">Cachetastic</span><span class="ruby-operator">::</span><span class="ruby-constant">Caches</span><span class="ruby-operator">::</span><span class="ruby-constant">MackSessionCache</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">id</span>)
|
177
|
+
9: <span class="ruby-keyword kw">end</span>
|
178
|
+
</pre>
|
179
|
+
</div>
|
180
|
+
</div>
|
181
|
+
</div>
|
182
|
+
|
183
|
+
<div id="method-M000002" class="method-detail">
|
184
|
+
<a name="M000002"></a>
|
185
|
+
|
186
|
+
<div class="method-heading">
|
187
|
+
<a href="#M000002" class="method-signature">
|
188
|
+
<span class="method-name">set</span><span class="method-args">(id, request, response, cookies)</span>
|
189
|
+
</a>
|
190
|
+
</div>
|
191
|
+
|
192
|
+
<div class="method-description">
|
193
|
+
<p><a class="source-toggle" href="#"
|
194
|
+
onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
|
195
|
+
<div class="method-source-code" id="M000002-source">
|
196
|
+
<pre>
|
197
|
+
<span class="ruby-comment cmt"># File lib/mack-caching/sessions/cachetastic_session_store.rb, line 11</span>
|
198
|
+
11: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set</span>(<span class="ruby-identifier">id</span>, <span class="ruby-identifier">request</span>, <span class="ruby-identifier">response</span>, <span class="ruby-identifier">cookies</span>)
|
199
|
+
12: <span class="ruby-operator">::</span><span class="ruby-constant">Cachetastic</span><span class="ruby-operator">::</span><span class="ruby-constant">Caches</span><span class="ruby-operator">::</span><span class="ruby-constant">MackSessionCache</span>.<span class="ruby-identifier">set</span>(<span class="ruby-identifier">id</span>, <span class="ruby-identifier">request</span>.<span class="ruby-identifier">session</span>)
|
200
|
+
13: <span class="ruby-keyword kw">end</span>
|
201
|
+
</pre>
|
202
|
+
</div>
|
203
|
+
</div>
|
204
|
+
</div>
|
205
|
+
|
206
|
+
|
207
|
+
</div>
|
208
|
+
|
209
|
+
|
210
|
+
</div>
|
211
|
+
|
212
|
+
|
213
|
+
<div id="validator-badges">
|
214
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
215
|
+
</div>
|
216
|
+
|
217
|
+
</body>
|
218
|
+
</html>
|
data/doc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Mon, 08 Sep 2008 10:56:23 -0400
|
data/doc/files/README.html
CHANGED
@@ -0,0 +1,101 @@
|
|
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>File: cachetastic_session_store.rb</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="fileHeader">
|
50
|
+
<h1>cachetastic_session_store.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>lib/mack-caching/sessions/cachetastic_session_store.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Mon Sep 08 10:32:42 -0400 2008</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
</div>
|
74
|
+
|
75
|
+
|
76
|
+
</div>
|
77
|
+
|
78
|
+
|
79
|
+
<!-- if includes -->
|
80
|
+
|
81
|
+
<div id="section">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
<!-- if method_list -->
|
91
|
+
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
|
96
|
+
<div id="validator-badges">
|
97
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
98
|
+
</div>
|
99
|
+
|
100
|
+
</body>
|
101
|
+
</html>
|
@@ -0,0 +1,107 @@
|
|
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>File: mack-caching_tasks.rb</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="fileHeader">
|
50
|
+
<h1>mack-caching_tasks.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>lib/mack-caching_tasks.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Mon Sep 08 10:32:42 -0400 2008</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
<div id="description">
|
72
|
+
<p>
|
73
|
+
load tasks
|
74
|
+
</p>
|
75
|
+
|
76
|
+
</div>
|
77
|
+
|
78
|
+
|
79
|
+
</div>
|
80
|
+
|
81
|
+
|
82
|
+
</div>
|
83
|
+
|
84
|
+
|
85
|
+
<!-- if includes -->
|
86
|
+
|
87
|
+
<div id="section">
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<!-- if method_list -->
|
97
|
+
|
98
|
+
|
99
|
+
</div>
|
100
|
+
|
101
|
+
|
102
|
+
<div id="validator-badges">
|
103
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
104
|
+
</div>
|
105
|
+
|
106
|
+
</body>
|
107
|
+
</html>
|
data/doc/fr_class_index.html
CHANGED
@@ -22,6 +22,8 @@
|
|
22
22
|
<div id="index-entries">
|
23
23
|
<a href="classes/Mack/Controller/ClassMethods.html">Mack::Controller::ClassMethods</a><br />
|
24
24
|
<a href="classes/Mack/Errors/UncacheableError.html">Mack::Errors::UncacheableError</a><br />
|
25
|
+
<a href="classes/Mack/SessionStore.html">Mack::SessionStore</a><br />
|
26
|
+
<a href="classes/Mack/SessionStore/Cachetastic.html">Mack::SessionStore::Cachetastic</a><br />
|
25
27
|
</div>
|
26
28
|
</div>
|
27
29
|
</body>
|
data/doc/fr_file_index.html
CHANGED
@@ -25,6 +25,8 @@
|
|
25
25
|
<a href="files/lib/mack-caching/errors_rb.html">lib/mack-caching/errors.rb</a><br />
|
26
26
|
<a href="files/lib/mack-caching/page_caching/controller_extensions_rb.html">lib/mack-caching/page_caching/controller_extensions.rb</a><br />
|
27
27
|
<a href="files/lib/mack-caching/page_caching/page_caching_rb.html">lib/mack-caching/page_caching/page_caching.rb</a><br />
|
28
|
+
<a href="files/lib/mack-caching/sessions/cachetastic_session_store_rb.html">lib/mack-caching/sessions/cachetastic_session_store.rb</a><br />
|
29
|
+
<a href="files/lib/mack-caching_tasks_rb.html">lib/mack-caching_tasks.rb</a><br />
|
28
30
|
</div>
|
29
31
|
</div>
|
30
32
|
</body>
|
data/doc/fr_method_index.html
CHANGED
@@ -20,7 +20,11 @@
|
|
20
20
|
<div id="index">
|
21
21
|
<h1 class="section-bar">Methods</h1>
|
22
22
|
<div id="index-entries">
|
23
|
-
<a href="classes/Mack/Controller/ClassMethods.html#
|
23
|
+
<a href="classes/Mack/Controller/ClassMethods.html#M000005">cache_pages (Mack::Controller::ClassMethods)</a><br />
|
24
|
+
<a href="classes/Mack/SessionStore/Cachetastic.html#M000003">expire (Mack::SessionStore::Cachetastic)</a><br />
|
25
|
+
<a href="classes/Mack/SessionStore/Cachetastic.html#M000004">expire_all (Mack::SessionStore::Cachetastic)</a><br />
|
26
|
+
<a href="classes/Mack/SessionStore/Cachetastic.html#M000001">get (Mack::SessionStore::Cachetastic)</a><br />
|
27
|
+
<a href="classes/Mack/SessionStore/Cachetastic.html#M000002">set (Mack::SessionStore::Cachetastic)</a><br />
|
24
28
|
</div>
|
25
29
|
</div>
|
26
30
|
</body>
|
data/lib/mack-caching.rb
CHANGED
@@ -1,4 +1,38 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
config_defaults = {
|
2
|
+
"cachetastic_default_options" => {
|
3
|
+
"debug" => false,
|
4
|
+
"adapter" => "local_memory",
|
5
|
+
"expiry_time" => 300,
|
6
|
+
"logging" => {
|
7
|
+
"logger_1" => {
|
8
|
+
"type" => "file",
|
9
|
+
"file" => Mack::Paths.log("cachetastic.log")
|
10
|
+
}
|
11
|
+
}
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
config = config_defaults
|
16
|
+
|
17
|
+
if Mack.env == "production"
|
18
|
+
config.merge!(
|
19
|
+
"cachetastic_caches_mack_session_cache_options" => {
|
20
|
+
"debug" => false,
|
21
|
+
"adapter" => "file",
|
22
|
+
"store_options" =>
|
23
|
+
{"dir" => File.join(Mack.root, "tmp")},
|
24
|
+
"expiry_time" => 14400,
|
25
|
+
"logging" => {
|
26
|
+
"logger_1" => {
|
27
|
+
"type" => "file",
|
28
|
+
"file" => Mack::Paths.log("cachetastic_caches_mack_session_cache.log")
|
29
|
+
}
|
30
|
+
}
|
31
|
+
})
|
32
|
+
end
|
33
|
+
app_config.load_hash(config.merge(app_config.final_configuration_settings), "mack-caching")
|
3
34
|
|
4
|
-
|
35
|
+
|
36
|
+
require File.join(File.dirname(__FILE__), "mack-caching", "sessions", "cachetastic_session_store")
|
37
|
+
require File.join(File.dirname(__FILE__), "mack-caching", "errors")
|
38
|
+
require File.join(File.dirname(__FILE__), "mack-caching", "page_caching", "page_caching")
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Mack
|
2
|
+
module SessionStore
|
3
|
+
class Cachetastic < Mack::SessionStore::Base
|
4
|
+
|
5
|
+
class << self
|
6
|
+
|
7
|
+
def get(id, request, response, cookies)
|
8
|
+
::Cachetastic::Caches::MackSessionCache.get(id)
|
9
|
+
end
|
10
|
+
|
11
|
+
def set(id, request, response, cookies)
|
12
|
+
::Cachetastic::Caches::MackSessionCache.set(id, request.session)
|
13
|
+
end
|
14
|
+
|
15
|
+
def expire(id, *args)
|
16
|
+
::Cachetastic::Caches::MackSessionCache.delete(id)
|
17
|
+
end
|
18
|
+
|
19
|
+
def expire_all
|
20
|
+
::Cachetastic::Caches::MackSessionCache.expire_all
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'rake'
|
1
2
|
namespace :cachetastic do
|
2
3
|
|
3
4
|
namespace :page_cache do
|
@@ -11,4 +12,58 @@ namespace :cachetastic do
|
|
11
12
|
|
12
13
|
end
|
13
14
|
|
15
|
+
task :manipulate_caches => :environment do
|
16
|
+
cache_name = ENV['cache_name']
|
17
|
+
cache_name = cache_name.camelcase
|
18
|
+
action = ENV['cache_action']
|
19
|
+
running_time("#{cache_name}.#{action}") do
|
20
|
+
case cache_name
|
21
|
+
when "All"
|
22
|
+
puts "About to work on ALL caches!"
|
23
|
+
# force all caches to register themselves:
|
24
|
+
["#{Mack.root}/lib/caches"].each do |dir|
|
25
|
+
Find.find(dir) do |f|
|
26
|
+
# puts f
|
27
|
+
if FileTest.directory?(f) and !f.match(/.svn/)
|
28
|
+
else
|
29
|
+
if FileTest.file?(f)
|
30
|
+
m = f.match(/\/[a-zA-Z\-_]*.rb$/)
|
31
|
+
if m
|
32
|
+
model = m.to_s
|
33
|
+
unless model.match("test_")
|
34
|
+
x = model.gsub('/', '').gsub('.rb', '')
|
35
|
+
# puts "x: #{x}"
|
36
|
+
require x
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
caches = Cachetastic::Caches::Base.all_registered_caches.dup
|
44
|
+
caches.sort!
|
45
|
+
caches.reverse!
|
46
|
+
caches.each do |cache|
|
47
|
+
do_work(cache, action)
|
48
|
+
end
|
49
|
+
else
|
50
|
+
do_work(cache_name, action)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def do_work(cache, action)
|
56
|
+
begin
|
57
|
+
puts "Calling: #{cache}.#{action}"
|
58
|
+
cache.constantize.send(action)
|
59
|
+
rescue MethodNotImplemented => e
|
60
|
+
msg = "Cachetastic.rake Warning: cache #{cache} does not implement #{action}. This is probably an error."
|
61
|
+
puts msg
|
62
|
+
Mack.logger.warning(msg)
|
63
|
+
rescue NoMethodError => e
|
64
|
+
rescue Exception => e
|
65
|
+
raise e
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
14
69
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mack-caching
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- markbates
|
@@ -9,10 +9,19 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-08
|
12
|
+
date: 2008-09-08 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
|
-
dependencies:
|
15
|
-
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: cachetastic
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - "="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 1.7.4
|
24
|
+
version:
|
16
25
|
description: "mack-caching was developed by: markbates"
|
17
26
|
email: mark@mackframework.com
|
18
27
|
executables: []
|
@@ -25,16 +34,22 @@ files:
|
|
25
34
|
- lib/mack-caching/errors.rb
|
26
35
|
- lib/mack-caching/page_caching/controller_extensions.rb
|
27
36
|
- lib/mack-caching/page_caching/page_caching.rb
|
37
|
+
- lib/mack-caching/sessions/cachetastic_session_store.rb
|
28
38
|
- lib/mack-caching/tasks/cachetastic.rake
|
29
39
|
- lib/mack-caching.rb
|
40
|
+
- lib/mack-caching_tasks.rb
|
30
41
|
- README
|
31
42
|
- doc/classes/Mack/Controller/ClassMethods.html
|
32
43
|
- doc/classes/Mack/Errors/UncacheableError.html
|
44
|
+
- doc/classes/Mack/SessionStore/Cachetastic.html
|
45
|
+
- doc/classes/Mack/SessionStore.html
|
33
46
|
- doc/created.rid
|
34
47
|
- doc/files/lib/mack-caching/errors_rb.html
|
35
48
|
- doc/files/lib/mack-caching/page_caching/controller_extensions_rb.html
|
36
49
|
- doc/files/lib/mack-caching/page_caching/page_caching_rb.html
|
50
|
+
- doc/files/lib/mack-caching/sessions/cachetastic_session_store_rb.html
|
37
51
|
- doc/files/lib/mack-caching_rb.html
|
52
|
+
- doc/files/lib/mack-caching_tasks_rb.html
|
38
53
|
- doc/files/README.html
|
39
54
|
- doc/fr_class_index.html
|
40
55
|
- doc/fr_file_index.html
|