memcaches_page 0.1.0 → 0.1.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/CHANGELOG.md +8 -0
- data/lib/memcaches_page.rb +3 -2
- data/memcaches_page.gemspec +1 -1
- metadata +4 -3
data/CHANGELOG.md
ADDED
data/lib/memcaches_page.rb
CHANGED
@@ -2,9 +2,10 @@ 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 and Rails.cache.class.to_s == 'ActiveSupport::Cache::DalliStore'
|
6
6
|
|
7
|
-
namespace = Rails.configuration.cache_store[2][:namespace]
|
7
|
+
namespace = Rails.configuration.cache_store[2][:namespace] rescue nil
|
8
|
+
namespace ||= ""
|
8
9
|
|
9
10
|
cache = Rails.cache.instance_variable_get(:@data)
|
10
11
|
cache.set namespace + path.gsub('%', '%25'), content, nil, raw: true
|
data/memcaches_page.gemspec
CHANGED
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.1
|
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-06-
|
12
|
+
date: 2012-06-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -35,6 +35,7 @@ extensions: []
|
|
35
35
|
extra_rdoc_files: []
|
36
36
|
files:
|
37
37
|
- .gitignore
|
38
|
+
- CHANGELOG.md
|
38
39
|
- Gemfile
|
39
40
|
- LICENSE
|
40
41
|
- README.md
|
@@ -61,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
62
|
version: '0'
|
62
63
|
requirements: []
|
63
64
|
rubyforge_project:
|
64
|
-
rubygems_version: 1.8.
|
65
|
+
rubygems_version: 1.8.22
|
65
66
|
signing_key:
|
66
67
|
specification_version: 3
|
67
68
|
summary: Uses configuration from Rails cache store. Optionally takes a :namespace
|