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 ADDED
@@ -0,0 +1,8 @@
1
+ # MemcachesPage Gem Changelog
2
+
3
+ ## 0.1.1 - 2018/06/19
4
+ * Still work with no namespace set
5
+ * Fail silently if Dalli isn't the store
6
+
7
+ ## 0.1.0 - 2012/06/18
8
+ * First release
@@ -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
@@ -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.0'
16
+ gem.version = '0.1.1'
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.0
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-18 00:00:00.000000000 Z
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.23
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