rack-page_caching 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -3
- data/lib/rack/page_caching/version.rb +1 -1
- data/rack-page_caching.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21eb17443ad18bf94e84f24780751458a3dd65f0
|
4
|
+
data.tar.gz: e8c38b6013a424a5493a51045d10be48b8b51e96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79dfeb508fcffeed8938a168fc057c8a1adbad0673c586e92d2c87875de3f48353cd557282dadd5f34455dd7497d04778f30ba63f2413d689f3415cd4326f3d9
|
7
|
+
data.tar.gz: b4598781e277ab092032a6c084170110ffa0cb41788c4bf988d08ff505db0d7b899a939bf8d6f2da38b6ccd137f7ff75249a00d29bb895b6a86b89178692876c
|
data/README.md
CHANGED
@@ -6,8 +6,8 @@
|
|
6
6
|
[![Dependency Status](https://gemnasium.com/weynsee/rack-page_caching.svg)](https://gemnasium.com/weynsee/rack-page_caching)
|
7
7
|
|
8
8
|
Rack::PageCaching is a Rack middleware that aids in static page caching. It serves
|
9
|
-
the same purpose as [page caching
|
10
|
-
and was designed to be a drop-in replacement
|
9
|
+
the same purpose as [Rails page caching](https://github.com/rails/actionpack-page_caching)
|
10
|
+
and was designed to be a drop-in replacement for it.
|
11
11
|
|
12
12
|
Rack::PageCaching provides a few differences from Rails page caching. It is
|
13
13
|
implemented as a Rack middleware, which means transformations done on the
|
@@ -70,7 +70,7 @@ config.middleware.use Rack::PageCaching,
|
|
70
70
|
# e.g. :best_speed and :best_compression. To turn off gzip, pass in false.
|
71
71
|
gzip: :best_speed,
|
72
72
|
# Hostnames can be included in the path of the page cache. Default is false.
|
73
|
-
include_hostname:
|
73
|
+
include_hostname: true
|
74
74
|
```
|
75
75
|
Rack::PageCaching respects `config.action_controller.perform_caching` and
|
76
76
|
will skip cache generation if it is false.
|
@@ -105,6 +105,18 @@ class WeblogController < ActionController::Base
|
|
105
105
|
end
|
106
106
|
end
|
107
107
|
```
|
108
|
+
You can delete pages manually (e.g. in a rake task) using the following command:
|
109
|
+
```ruby
|
110
|
+
Rack::PageCaching::Cache.delete 'weblog/*.html'
|
111
|
+
# if you have hostnames enabled, use '**/weblog/*.html' to delete regardless
|
112
|
+
# of which hostname the files are nested in
|
113
|
+
```
|
114
|
+
|
115
|
+
## Acknowledgements
|
116
|
+
|
117
|
+
Tests for compatibility with Rails page caching and ActionController integration
|
118
|
+
were heavily inspired by code in the
|
119
|
+
[Rails page caching gem](https://github.com/rails/actionpack-page_caching).
|
108
120
|
|
109
121
|
## Contributing
|
110
122
|
|
data/rack-page_caching.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.required_ruby_version = '>= 1.9.
|
21
|
+
spec.required_ruby_version = '>= 1.9.3'
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.6"
|
24
24
|
spec.add_development_dependency "rake"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-page_caching
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wayne See
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -155,7 +155,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
155
155
|
requirements:
|
156
156
|
- - ">="
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
version: 1.9.
|
158
|
+
version: 1.9.3
|
159
159
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
160
|
requirements:
|
161
161
|
- - ">="
|