memcaches_page 0.1.1 → 0.1.2
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 +2 -2
- data/lib/memcaches_page.rb +2 -6
- data/memcaches_page.gemspec +2 -2
- metadata +2 -3
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# MemcachesPage
|
2
2
|
|
3
|
-
Overrides `caches_page` and stores in memcached instead. Uses configuration from Rails cache store.
|
3
|
+
Overrides `caches_page` and stores in memcached instead. Uses configuration from Rails cache store.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -20,7 +20,7 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
Configuration:
|
22
22
|
|
23
|
-
`config.cache_store :dalli_store, ['memcache.dev:11211'], expires_in: 604800, namespace: "site
|
23
|
+
`config.cache_store :dalli_store, ['memcache.dev:11211'], expires_in: 604800, namespace: "site"`
|
24
24
|
|
25
25
|
Note, ensure compression isn't used, or if you do configure nginx to inflate it before serving.
|
26
26
|
|
data/lib/memcaches_page.rb
CHANGED
@@ -2,13 +2,9 @@ module MemcachesPage
|
|
2
2
|
extend ActiveSupport::Concern
|
3
3
|
module ClassMethods
|
4
4
|
def cache_page(content, path)
|
5
|
-
return unless perform_caching
|
5
|
+
return unless perform_caching
|
6
6
|
|
7
|
-
|
8
|
-
namespace ||= ""
|
9
|
-
|
10
|
-
cache = Rails.cache.instance_variable_get(:@data)
|
11
|
-
cache.set namespace + path.gsub('%', '%25'), content, nil, raw: true
|
7
|
+
Rails.cache.write path.gsub('%', '%25'), content, raw: true
|
12
8
|
end
|
13
9
|
end
|
14
10
|
|
data/memcaches_page.gemspec
CHANGED
@@ -3,7 +3,7 @@ Gem::Specification.new do |gem|
|
|
3
3
|
gem.authors = ["Paul Bowsher"]
|
4
4
|
gem.email = ["pbowsher@globalpersonals.co.uk"]
|
5
5
|
gem.description = %q{Overrides caches_page and stores in memcached instead.}
|
6
|
-
gem.summary = %q{Uses configuration from Rails cache store.
|
6
|
+
gem.summary = %q{Uses configuration from Rails cache store.}
|
7
7
|
gem.homepage = ""
|
8
8
|
|
9
9
|
gem.add_dependency("rails", "~> 3.1")
|
@@ -13,5 +13,5 @@ Gem::Specification.new do |gem|
|
|
13
13
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
14
|
gem.name = "memcaches_page"
|
15
15
|
gem.require_paths = ["lib"]
|
16
|
-
gem.version = '0.1.
|
16
|
+
gem.version = '0.1.2'
|
17
17
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: memcaches_page
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -65,6 +65,5 @@ rubyforge_project:
|
|
65
65
|
rubygems_version: 1.8.22
|
66
66
|
signing_key:
|
67
67
|
specification_version: 3
|
68
|
-
summary: Uses configuration from Rails cache store.
|
69
|
-
configuration key too.
|
68
|
+
summary: Uses configuration from Rails cache store.
|
70
69
|
test_files: []
|