nesta-plugin-diskcached 0.0.2 → 0.0.3
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/README.md +9 -11
- data/WHY.md +21 -18
- data/doc/Nesta.html +1 -1
- data/doc/Nesta/App.html +1 -1
- data/doc/Nesta/Config.html +1 -1
- data/doc/Nesta/Overrides.html +1 -1
- data/doc/Nesta/Overrides/Renderers.html +1 -1
- data/doc/Nesta/Page.html +1 -1
- data/doc/Nesta/Plugin.html +1 -1
- data/doc/Nesta/Plugin/Diskcache.html +1 -1
- data/doc/Nesta/Plugin/Diskcache/NoDiskcache.html +1 -1
- data/doc/_index.html +1 -1
- data/doc/file.README.html +11 -14
- data/doc/index.html +11 -14
- data/doc/top-level-namespace.html +1 -1
- data/lib/nesta-plugin-diskcached/init.rb +4 -1
- data/lib/nesta-plugin-diskcached/version.rb +1 -1
- metadata +2 -3
data/README.md
CHANGED
|
@@ -6,8 +6,6 @@ A Nesta Plugin for disk cache via diskcached. It is an alternative to using Nest
|
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
|
-
> ONCE COMPLETED -- This doesn't work yet!
|
|
10
|
-
|
|
11
9
|
Add this line to your application's Gemfile:
|
|
12
10
|
|
|
13
11
|
gem 'nesta-plugin-diskcached'
|
|
@@ -24,15 +22,15 @@ Or install it yourself as:
|
|
|
24
22
|
|
|
25
23
|
Add optional params to your config/config.yml
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
diskcached: true # default
|
|
26
|
+
diskcached_timeout: 3600 # default (in seconds)
|
|
27
|
+
diskcached_dir: /tmp/diskcached
|
|
28
|
+
# defaults to "Nesta::Env.root/diskcached"
|
|
29
|
+
#
|
|
30
|
+
# Values added for 'diskcached_dir' should
|
|
31
|
+
# be a full path starting with '/', otherwise
|
|
32
|
+
# Nesta::Env.root will be added to the beginning
|
|
33
|
+
# of the path string.
|
|
36
34
|
|
|
37
35
|
## Notes
|
|
38
36
|
|
data/WHY.md
CHANGED
|
@@ -4,35 +4,38 @@
|
|
|
4
4
|
|
|
5
5
|
### With Diskcached
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
httperf --client=0/1 --server=localhost --port=8080 --uri=/ --send-buffer=4096 --recv-buffer=16384 --num-conns=100 --num-calls=1
|
|
8
|
+
Maximum connect burst length: 1
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Total: connections 100 requests 100 replies 100 test-duration 1.186 s
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
Connection rate: 84.3 conn/s (11.9 ms/conn, <=1 concurrent connections)
|
|
13
|
+
Connection time [ms]: min 5.1 avg 11.9 max 31.6 median 9.5 stddev 5.6
|
|
14
|
+
Connection time [ms]: connect 0.1
|
|
15
|
+
Connection length [replies/conn]: 1.000
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
Request rate: 84.3 req/s (11.9 ms/req)
|
|
18
|
+
Request size [B]: 62.0
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
Reply rate [replies/s]: min 0.0 avg 0.0 max 0.0 stddev 0.0 (0 samples)
|
|
21
|
+
Reply time [ms]: response 11.5 transfer 0.3
|
|
22
|
+
Reply size [B]: header 308.0 content 5203.0 footer 0.0 (total 5511.0)
|
|
23
|
+
Reply status: 1xx=0 2xx=100 3xx=0 4xx=0 5xx=0
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
CPU time [s]: user 0.63 system 0.55 (user 53.2% system 46.6% total 99.8%)
|
|
26
|
+
Net I/O: 458.7 KB/s (3.8*10^6 bps)
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0
|
|
29
|
+
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
### Without Diskcached
|
|
33
33
|
|
|
34
34
|
httperf --verbose --client=0/1 --server=localhost --port=8080 --uri=/ --send-buffer=4096 --recv-buffer=16384 --num-conns=100 --num-calls=1
|
|
35
|
-
|
|
35
|
+
Maximum connect burst length: 1
|
|
36
|
+
|
|
37
|
+
Total: connections 100 requests 100 replies 100 test-duration 9.898 s
|
|
38
|
+
|
|
36
39
|
Connection rate: 10.1 conn/s (99.0 ms/conn, <=1 concurrent connections)
|
|
37
40
|
Connection time [ms]: min 83.0 avg 99.0 max 155.0 median 96.5 stddev 12.6
|
|
38
41
|
Connection time [ms]: connect 0.1
|
data/doc/Nesta.html
CHANGED
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
</div>
|
|
122
122
|
|
|
123
123
|
<div id="footer">
|
|
124
|
-
Generated on Thu Aug 23 01:
|
|
124
|
+
Generated on Thu Aug 23 01:32:55 2012 by
|
|
125
125
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
126
126
|
0.8.2.1 (ruby-1.9.3).
|
|
127
127
|
</div>
|
data/doc/Nesta/App.html
CHANGED
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
</div>
|
|
123
123
|
|
|
124
124
|
<div id="footer">
|
|
125
|
-
Generated on Thu Aug 23 01:
|
|
125
|
+
Generated on Thu Aug 23 01:32:55 2012 by
|
|
126
126
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
127
127
|
0.8.2.1 (ruby-1.9.3).
|
|
128
128
|
</div>
|
data/doc/Nesta/Config.html
CHANGED
|
@@ -416,7 +416,7 @@ present.</p>
|
|
|
416
416
|
</div>
|
|
417
417
|
|
|
418
418
|
<div id="footer">
|
|
419
|
-
Generated on Thu Aug 23 01:
|
|
419
|
+
Generated on Thu Aug 23 01:32:55 2012 by
|
|
420
420
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
421
421
|
0.8.2.1 (ruby-1.9.3).
|
|
422
422
|
</div>
|
data/doc/Nesta/Overrides.html
CHANGED
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
</div>
|
|
118
118
|
|
|
119
119
|
<div id="footer">
|
|
120
|
-
Generated on Thu Aug 23 01:
|
|
120
|
+
Generated on Thu Aug 23 01:32:55 2012 by
|
|
121
121
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
122
122
|
0.8.2.1 (ruby-1.9.3).
|
|
123
123
|
</div>
|
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
</div>
|
|
267
267
|
|
|
268
268
|
<div id="footer">
|
|
269
|
-
Generated on Thu Aug 23 01:
|
|
269
|
+
Generated on Thu Aug 23 01:32:55 2012 by
|
|
270
270
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
271
271
|
0.8.2.1 (ruby-1.9.3).
|
|
272
272
|
</div>
|
data/doc/Nesta/Page.html
CHANGED
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
</div>
|
|
194
194
|
|
|
195
195
|
<div id="footer">
|
|
196
|
-
Generated on Thu Aug 23 01:
|
|
196
|
+
Generated on Thu Aug 23 01:32:55 2012 by
|
|
197
197
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
198
198
|
0.8.2.1 (ruby-1.9.3).
|
|
199
199
|
</div>
|
data/doc/Nesta/Plugin.html
CHANGED
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
</div>
|
|
120
120
|
|
|
121
121
|
<div id="footer">
|
|
122
|
-
Generated on Thu Aug 23 01:
|
|
122
|
+
Generated on Thu Aug 23 01:32:55 2012 by
|
|
123
123
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
124
124
|
0.8.2.1 (ruby-1.9.3).
|
|
125
125
|
</div>
|
|
@@ -232,7 +232,7 @@
|
|
|
232
232
|
</div>
|
|
233
233
|
|
|
234
234
|
<div id="footer">
|
|
235
|
-
Generated on Thu Aug 23 01:
|
|
235
|
+
Generated on Thu Aug 23 01:32:55 2012 by
|
|
236
236
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
237
237
|
0.8.2.1 (ruby-1.9.3).
|
|
238
238
|
</div>
|
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
</div>
|
|
205
205
|
|
|
206
206
|
<div id="footer">
|
|
207
|
-
Generated on Thu Aug 23 01:
|
|
207
|
+
Generated on Thu Aug 23 01:32:55 2012 by
|
|
208
208
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
209
209
|
0.8.2.1 (ruby-1.9.3).
|
|
210
210
|
</div>
|
data/doc/_index.html
CHANGED
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
</div>
|
|
206
206
|
|
|
207
207
|
<div id="footer">
|
|
208
|
-
Generated on Thu Aug 23 01:
|
|
208
|
+
Generated on Thu Aug 23 01:32:55 2012 by
|
|
209
209
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
210
210
|
0.8.2.1 (ruby-1.9.3).
|
|
211
211
|
</div>
|
data/doc/file.README.html
CHANGED
|
@@ -69,8 +69,6 @@
|
|
|
69
69
|
|
|
70
70
|
<h2>Installation</h2>
|
|
71
71
|
|
|
72
|
-
<blockquote><p>ONCE COMPLETED -- This doesn't work yet!</p></blockquote>
|
|
73
|
-
|
|
74
72
|
<p>Add this line to your application's Gemfile:</p>
|
|
75
73
|
|
|
76
74
|
<pre class="code ruby"><code><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>nesta-plugin-diskcached</span><span class='tstring_end'>'</span></span>
|
|
@@ -90,17 +88,16 @@
|
|
|
90
88
|
|
|
91
89
|
<p>Add optional params to your config/config.yml</p>
|
|
92
90
|
|
|
93
|
-
<
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
</
|
|
103
|
-
</span></code></pre>
|
|
91
|
+
<pre class="code ruby"><code>diskcached: true # default
|
|
92
|
+
diskcached_timeout: 3600 # default (in seconds)
|
|
93
|
+
diskcached_dir: /tmp/diskcached
|
|
94
|
+
# defaults to "Nesta::Env.root/diskcached"
|
|
95
|
+
#
|
|
96
|
+
# Values added for 'diskcached_dir' should
|
|
97
|
+
# be a full path starting with '/', otherwise
|
|
98
|
+
# Nesta::Env.root will be added to the beginning
|
|
99
|
+
# of the path string.
|
|
100
|
+
</code></pre>
|
|
104
101
|
|
|
105
102
|
<h2>Notes</h2>
|
|
106
103
|
|
|
@@ -134,7 +131,7 @@ It really doesn't hurt performance, but is just a bit ugly.</li>
|
|
|
134
131
|
</div></div>
|
|
135
132
|
|
|
136
133
|
<div id="footer">
|
|
137
|
-
Generated on Thu Aug 23 01:
|
|
134
|
+
Generated on Thu Aug 23 01:32:55 2012 by
|
|
138
135
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
139
136
|
0.8.2.1 (ruby-1.9.3).
|
|
140
137
|
</div>
|
data/doc/index.html
CHANGED
|
@@ -69,8 +69,6 @@
|
|
|
69
69
|
|
|
70
70
|
<h2>Installation</h2>
|
|
71
71
|
|
|
72
|
-
<blockquote><p>ONCE COMPLETED -- This doesn't work yet!</p></blockquote>
|
|
73
|
-
|
|
74
72
|
<p>Add this line to your application's Gemfile:</p>
|
|
75
73
|
|
|
76
74
|
<pre class="code ruby"><code><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>nesta-plugin-diskcached</span><span class='tstring_end'>'</span></span>
|
|
@@ -90,17 +88,16 @@
|
|
|
90
88
|
|
|
91
89
|
<p>Add optional params to your config/config.yml</p>
|
|
92
90
|
|
|
93
|
-
<
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
</
|
|
103
|
-
</span></code></pre>
|
|
91
|
+
<pre class="code ruby"><code>diskcached: true # default
|
|
92
|
+
diskcached_timeout: 3600 # default (in seconds)
|
|
93
|
+
diskcached_dir: /tmp/diskcached
|
|
94
|
+
# defaults to "Nesta::Env.root/diskcached"
|
|
95
|
+
#
|
|
96
|
+
# Values added for 'diskcached_dir' should
|
|
97
|
+
# be a full path starting with '/', otherwise
|
|
98
|
+
# Nesta::Env.root will be added to the beginning
|
|
99
|
+
# of the path string.
|
|
100
|
+
</code></pre>
|
|
104
101
|
|
|
105
102
|
<h2>Notes</h2>
|
|
106
103
|
|
|
@@ -134,7 +131,7 @@ It really doesn't hurt performance, but is just a bit ugly.</li>
|
|
|
134
131
|
</div></div>
|
|
135
132
|
|
|
136
133
|
<div id="footer">
|
|
137
|
-
Generated on Thu Aug 23 01:
|
|
134
|
+
Generated on Thu Aug 23 01:32:55 2012 by
|
|
138
135
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
139
136
|
0.8.2.1 (ruby-1.9.3).
|
|
140
137
|
</div>
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
</div>
|
|
104
104
|
|
|
105
105
|
<div id="footer">
|
|
106
|
-
Generated on Thu Aug 23 01:
|
|
106
|
+
Generated on Thu Aug 23 01:32:55 2012 by
|
|
107
107
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
108
108
|
0.8.2.1 (ruby-1.9.3).
|
|
109
109
|
</div>
|
|
@@ -69,7 +69,7 @@ module Nesta
|
|
|
69
69
|
#
|
|
70
70
|
# @param [String] cache store location
|
|
71
71
|
def self.diskcached_dir
|
|
72
|
-
default =
|
|
72
|
+
default = "/tmp/.nesta-diskcache"
|
|
73
73
|
set = from_environment("diskcached_dir") || from_yaml("diskcached_dir") || default
|
|
74
74
|
|
|
75
75
|
case set
|
|
@@ -80,6 +80,9 @@ module Nesta
|
|
|
80
80
|
else # everything else should start at nesta's root
|
|
81
81
|
File.join(Nesta::Env.root, set)
|
|
82
82
|
end
|
|
83
|
+
rescue
|
|
84
|
+
# fail safe
|
|
85
|
+
default
|
|
83
86
|
end
|
|
84
87
|
|
|
85
88
|
# Set default cache timeout for diskcached or read
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nesta-plugin-diskcached
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-08-
|
|
12
|
+
date: 2012-08-30 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: nesta
|
|
@@ -143,4 +143,3 @@ signing_key:
|
|
|
143
143
|
specification_version: 3
|
|
144
144
|
summary: ! 'A Nesta plugin for disk cacheing via diskcached. Also see: http://diskcached.rubyops.net/'
|
|
145
145
|
test_files: []
|
|
146
|
-
has_rdoc:
|