cachetastic 1.0.6 → 1.0.7
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/ActiveRecord.html +107 -0
- data/doc/classes/ActiveRecord/Base.html +207 -0
- data/doc/classes/ActiveRecord/Base.src/M000001.html +25 -0
- data/doc/classes/ActiveRecord/Base.src/M000002.html +18 -0
- data/doc/classes/ActiveRecord/Base.src/M000003.html +18 -0
- data/doc/classes/ActiveRecord/Base.src/M000004.html +18 -0
- data/doc/classes/ActiveRecord/Base.src/M000005.html +18 -0
- data/doc/classes/Cachetastic.html +119 -0
- data/doc/classes/Cachetastic/Caches.html +114 -0
- data/doc/classes/Cachetastic/Caches/ActiveRecord.html +105 -0
- data/doc/classes/Cachetastic/Caches/Base.html +240 -0
- data/doc/classes/Cachetastic/Caches/Base.src/M000033.html +28 -0
- data/doc/classes/Cachetastic/Caches/Base.src/M000034.html +32 -0
- data/doc/classes/Cachetastic/Caches/Base.src/M000035.html +20 -0
- data/doc/classes/Cachetastic/Caches/Base.src/M000036.html +19 -0
- data/doc/classes/Cachetastic/Caches/Base.src/M000037.html +18 -0
- data/doc/classes/Cachetastic/Caches/Base.src/M000038.html +18 -0
- data/doc/classes/Cachetastic/Caches/Base.src/M000039.html +18 -0
- data/doc/classes/Cachetastic/Caches/PageCache.html +113 -0
- data/doc/classes/Cachetastic/Caches/RailsSessionCache.html +113 -0
- data/doc/classes/Cachetastic/Connection.html +186 -0
- data/doc/classes/Cachetastic/Connection.src/M000040.html +18 -0
- data/doc/classes/Cachetastic/Connection.src/M000041.html +24 -0
- data/doc/classes/Cachetastic/Helpers.html +115 -0
- data/doc/classes/Cachetastic/Helpers/ActiveRecord.html +165 -0
- data/doc/classes/Cachetastic/Helpers/ActiveRecord.src/M000006.html +29 -0
- data/doc/classes/Cachetastic/Helpers/ActiveRecord.src/M000007.html +23 -0
- data/doc/classes/Cachetastic/Helpers/ActiveRecord.src/M000008.html +18 -0
- data/doc/classes/Cachetastic/Logger.html +174 -0
- data/doc/classes/Cachetastic/Logger.src/M000042.html +22 -0
- data/doc/classes/Cachetastic/Stores.html +113 -0
- data/doc/classes/Cachetastic/Stores/Base.html +237 -0
- data/doc/classes/Cachetastic/Stores/Base.src/M000028.html +24 -0
- data/doc/classes/Cachetastic/Stores/Base.src/M000029.html +18 -0
- data/doc/classes/Cachetastic/Stores/Base.src/M000030.html +20 -0
- data/doc/classes/Cachetastic/Stores/Base.src/M000031.html +22 -0
- data/doc/classes/Cachetastic/Stores/Base.src/M000032.html +21 -0
- data/doc/classes/Cachetastic/Stores/LocalMemory.html +233 -0
- data/doc/classes/Cachetastic/Stores/LocalMemory.src/M000020.html +18 -0
- data/doc/classes/Cachetastic/Stores/LocalMemory.src/M000021.html +18 -0
- data/doc/classes/Cachetastic/Stores/LocalMemory.src/M000022.html +18 -0
- data/doc/classes/Cachetastic/Stores/LocalMemory.src/M000023.html +26 -0
- data/doc/classes/Cachetastic/Stores/LocalMemory.src/M000024.html +18 -0
- data/doc/classes/Cachetastic/Stores/LocalMemory.src/M000025.html +25 -0
- data/doc/classes/Cachetastic/Stores/LocalMemory/StoreObject.html +177 -0
- data/doc/classes/Cachetastic/Stores/LocalMemory/StoreObject.src/M000026.html +27 -0
- data/doc/classes/Cachetastic/Stores/LocalMemory/StoreObject.src/M000027.html +19 -0
- data/doc/classes/Cachetastic/Stores/Memcache.html +309 -0
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000009.html +19 -0
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000010.html +18 -0
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000011.html +18 -0
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000012.html +18 -0
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000013.html +18 -0
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000014.html +18 -0
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000015.html +19 -0
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000016.html +24 -0
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000017.html +20 -0
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000018.html +20 -0
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000019.html +24 -0
- data/doc/created.rid +1 -0
- data/doc/files/init_rb.html +101 -0
- data/doc/files/lib/caches/cachetastic_caches_base_rb.html +101 -0
- data/doc/files/lib/caches/cachetastic_caches_page_cache_rb.html +101 -0
- data/doc/files/lib/caches/cachetastic_caches_rails_session_cache_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 +233 -0
- data/doc/files/lib/helpers/cachetastic_helpers_active_record_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/stores/cachetastic_stores_base_rb.html +101 -0
- data/doc/files/lib/stores/cachetastic_stores_local_memory_rb.html +101 -0
- data/doc/files/lib/stores/cachetastic_stores_memcache_rb.html +101 -0
- data/doc/fr_class_index.html +43 -0
- data/doc/fr_file_index.html +39 -0
- data/doc/fr_method_index.html +68 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/init.rb +3 -1
- data/lib/caches/cachetastic_caches_base.rb +3 -0
- data/lib/caches/cachetastic_caches_page_cache.rb +2 -1
- data/lib/caches/cachetastic_caches_rails_session_cache.rb +2 -1
- data/lib/cachetastic.rb +5 -0
- data/lib/cachetastic_connection.rb +4 -3
- data/lib/cachetastic_logger.rb +1 -0
- data/lib/stores/cachetastic_stores_base.rb +0 -17
- data/lib/stores/cachetastic_stores_memcache.rb +1 -90
- data/lib/tasks/rubyforge_config.yml +1 -1
- metadata +91 -3
|
@@ -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: cachetastic_connection.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_connection.rb</h1>
|
|
51
|
+
<table class="header-table">
|
|
52
|
+
<tr class="top-aligned-row">
|
|
53
|
+
<td><strong>Path:</strong></td>
|
|
54
|
+
<td>lib/cachetastic_connection.rb
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr class="top-aligned-row">
|
|
58
|
+
<td><strong>Last Update:</strong></td>
|
|
59
|
+
<td>Wed Jan 02 21:36:27 -0500 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
|
+
This class caches store objects for each cache in the system.
|
|
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>
|
|
@@ -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: cachetastic_logger.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_logger.rb</h1>
|
|
51
|
+
<table class="header-table">
|
|
52
|
+
<tr class="top-aligned-row">
|
|
53
|
+
<td><strong>Path:</strong></td>
|
|
54
|
+
<td>lib/cachetastic_logger.rb
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr class="top-aligned-row">
|
|
58
|
+
<td><strong>Last Update:</strong></td>
|
|
59
|
+
<td>Wed Jan 02 21:36:27 -0500 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
|
+
This class handles logging for the caches and their stores.
|
|
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>
|
|
@@ -0,0 +1,233 @@
|
|
|
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.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.rb</h1>
|
|
51
|
+
<table class="header-table">
|
|
52
|
+
<tr class="top-aligned-row">
|
|
53
|
+
<td><strong>Path:</strong></td>
|
|
54
|
+
<td>lib/cachetastic.rb
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr class="top-aligned-row">
|
|
58
|
+
<td><strong>Last Update:</strong></td>
|
|
59
|
+
<td>Wed Jan 02 21:36:27 -0500 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
|
+
<h1>Gem Requirements:</h1>
|
|
73
|
+
<ul>
|
|
74
|
+
<li>Application Configuration
|
|
75
|
+
|
|
76
|
+
</li>
|
|
77
|
+
<li>Ruby Extensions
|
|
78
|
+
|
|
79
|
+
</li>
|
|
80
|
+
<li>Rails Extensions
|
|
81
|
+
|
|
82
|
+
</li>
|
|
83
|
+
</ul>
|
|
84
|
+
<h1>Configuration:</h1>
|
|
85
|
+
<pre>
|
|
86
|
+
cachetastic_default_options:
|
|
87
|
+
# this will dump into the log, configuration info for each cache, as well as the .inspect
|
|
88
|
+
# for each object returned from the cache
|
|
89
|
+
debug: true # true | false (default: false)
|
|
90
|
+
# this is the type of file store to be used for this cache.
|
|
91
|
+
# more stores can be developed and plugged in as desired
|
|
92
|
+
store: local_memory # local_memory | memcache (default: local_memory)
|
|
93
|
+
# this will marshall objects into and out of the store.
|
|
94
|
+
# so far yaml is the only supported marshall format.
|
|
95
|
+
marshall_method: none # none | yaml (default: none)
|
|
96
|
+
# this sets how long objects will live in the cache before they are auto expired.
|
|
97
|
+
default_expiry: <%= 24.hours %> # time in seconds (default: 24 hours)
|
|
98
|
+
# when setting objects into the cache the expiry_swing is +/- to the expiry time.
|
|
99
|
+
# example: if the expiry time is 1 hour, and the swing is 15 minutes,
|
|
100
|
+
# objects will go into the cache with an expiry time sometime between 45 mins and 75 mins.
|
|
101
|
+
expiry_swing: <%= 15.minutes %> # time in seconds (default: 0)
|
|
102
|
+
# these options get passed on directly to the store.
|
|
103
|
+
# only the memcache store uses these options currently.
|
|
104
|
+
store_options: # listed below are options for memcache
|
|
105
|
+
c_threshold: 10_000
|
|
106
|
+
compression: true
|
|
107
|
+
debug: false
|
|
108
|
+
readonly: false
|
|
109
|
+
urlencode: false
|
|
110
|
+
# configure logging for this cache:
|
|
111
|
+
logging:
|
|
112
|
+
# n number of logs can be configured for a cache
|
|
113
|
+
# their names can be anything you want, it's doesn't matter
|
|
114
|
+
logger_1:
|
|
115
|
+
# this sets the type of log you want to write to.
|
|
116
|
+
# right now the only two options are file and console
|
|
117
|
+
type: file # console | file (default: none)
|
|
118
|
+
# if the type is file, you need to configure where the log file is to be written.
|
|
119
|
+
file: log/memcached.log # relative | absolute path to log file
|
|
120
|
+
# this sets the level of logging for this cache
|
|
121
|
+
level: info # debug | info | warn | error | fatal (default: info)
|
|
122
|
+
logger_2:
|
|
123
|
+
# this sets the type of log you want to write to.
|
|
124
|
+
# right now the only two options are file and console
|
|
125
|
+
type: console # console | file (default: none)
|
|
126
|
+
# this sets the level of logging for this cache
|
|
127
|
+
level: error # debug | info | warn | error | fatal (default: info)
|
|
128
|
+
# set the servers to be used for memcache
|
|
129
|
+
servers:
|
|
130
|
+
- 127.0.0.1:11211 # ip:port used for memcache
|
|
131
|
+
</pre>
|
|
132
|
+
<p>
|
|
133
|
+
# if using the mongrel_page_cache_handler gem, you can configure it to use
|
|
134
|
+
cachetastic.
|
|
135
|
+
</p>
|
|
136
|
+
<pre>
|
|
137
|
+
page_cache_storage: cachetastic # disk | cachetastic (default: cachetastic)
|
|
138
|
+
</pre>
|
|
139
|
+
<p>
|
|
140
|
+
# example of how to override options for page cacheing:
|
|
141
|
+
</p>
|
|
142
|
+
<pre>
|
|
143
|
+
cachetastic_caches_page_cache_options:
|
|
144
|
+
default_expiry: <%= 1.hour %>
|
|
145
|
+
expiry_swing: <%= 15.minutes %>
|
|
146
|
+
</pre>
|
|
147
|
+
<p>
|
|
148
|
+
# example of how to override options for rails session cacheing:
|
|
149
|
+
</p>
|
|
150
|
+
<pre>
|
|
151
|
+
cachetastic_caches_rails_session_cache_options:
|
|
152
|
+
default_expiry: <%= 30.minutes %>
|
|
153
|
+
</pre>
|
|
154
|
+
<h1>Examples:</h1>
|
|
155
|
+
<pre>
|
|
156
|
+
class MyAwesomeCache < Cachetastic::Caches::Base
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
MyAwesomeCache.set(1, [1,2,3])
|
|
160
|
+
MyAwesomeCache.get(1) # => [1,2,3]
|
|
161
|
+
|
|
162
|
+
class MyAwesomeCache < Cachetastic::Caches::Base
|
|
163
|
+
class << self
|
|
164
|
+
def get(key, x, y)
|
|
165
|
+
super(key) do
|
|
166
|
+
n = x + y
|
|
167
|
+
set(key, n)
|
|
168
|
+
n
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
MyAwesomeCache.get(1, 2, 4) # => 8
|
|
175
|
+
MyAwesomeCache.get(1, 4, 4) # => 8
|
|
176
|
+
</pre>
|
|
177
|
+
|
|
178
|
+
</div>
|
|
179
|
+
|
|
180
|
+
<div id="requires-list">
|
|
181
|
+
<h3 class="section-bar">Required files</h3>
|
|
182
|
+
|
|
183
|
+
<div class="name-list">
|
|
184
|
+
rubygems
|
|
185
|
+
memcache
|
|
186
|
+
singleton
|
|
187
|
+
logger
|
|
188
|
+
yaml
|
|
189
|
+
zlib
|
|
190
|
+
pp
|
|
191
|
+
cachetastic_connection
|
|
192
|
+
cachetastic_logger
|
|
193
|
+
caches/cachetastic_caches_base
|
|
194
|
+
caches/cachetastic_caches_page_cache
|
|
195
|
+
caches/cachetastic_caches_rails_session_cache
|
|
196
|
+
stores/cachetastic_stores_base
|
|
197
|
+
stores/cachetastic_stores_memcache
|
|
198
|
+
stores/cachetastic_stores_local_memory
|
|
199
|
+
helpers/cachetastic_helpers_active_record
|
|
200
|
+
rails_extensions/cachetastic_active_record_base
|
|
201
|
+
rails_extensions/cgi_session_cachetastic_store
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
|
|
205
|
+
</div>
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
</div>
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
<!-- if includes -->
|
|
212
|
+
|
|
213
|
+
<div id="section">
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
<!-- if method_list -->
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
</div>
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
<div id="validator-badges">
|
|
229
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
230
|
+
</div>
|
|
231
|
+
|
|
232
|
+
</body>
|
|
233
|
+
</html>
|
|
@@ -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_helpers_active_record.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_helpers_active_record.rb</h1>
|
|
51
|
+
<table class="header-table">
|
|
52
|
+
<tr class="top-aligned-row">
|
|
53
|
+
<td><strong>Path:</strong></td>
|
|
54
|
+
<td>lib/helpers/cachetastic_helpers_active_record.rb
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr class="top-aligned-row">
|
|
58
|
+
<td><strong>Last Update:</strong></td>
|
|
59
|
+
<td>Thu Dec 27 14:48:41 -0500 2007</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>
|