cache_failover 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d5991671822e08f31cb2622b1acfc7e0f916e6666f5cbab87021a066ada840f
4
- data.tar.gz: 77e29f1e8151e7ffead1e13edf1d2ab422724f8acfe260dd1fe842cd1a03254e
3
+ metadata.gz: 1dc6c8a3ec9341137a0873d4c4beb2603f0bf64fadb23f5a0fc3712852a6b216
4
+ data.tar.gz: d3b7b20bd41accc9cbae4618eb1c05237c8968cf7d841c02dafe47c90b763451
5
5
  SHA512:
6
- metadata.gz: d4cb4b6a5a2804d1eb6de0450f03070870d3c56c9fb4cd78be4fed51f32485479762ddba8c03ad3dd6a067fddc703627000b8eb1988c22e2328e5de5ee3bbbd9
7
- data.tar.gz: 55e91982231ace2529ecc8a47e81be6bbec454d2f695142fea8c2984a346be120a1ecbc3a679c63767d51cb205976cdcc13b12a945266c91b36efa996eb29cd1
6
+ metadata.gz: e3c0cbb11b456521b80c803af725411614192b9eb64aa729fb651faa40d7037efd07456502e00e54b5126a5f7df2ea42877a4333246cadeda58bae0dcdeff08a
7
+ data.tar.gz: 5386790fa9e513fb28508a0cc4ddbc6ce809325d5edca06c00a88076e586dbc132429fd302867e2b7e10d1084aa62cce02b54d898f04bfb8bbc0f44f7341a8b0
@@ -4,3 +4,6 @@
4
4
  # Datasource local storage ignored files
5
5
  /dataSources/
6
6
  /dataSources.local.xml
7
+ .idea
8
+
9
+ /.idea/
@@ -11,6 +11,5 @@
11
11
  </content>
12
12
  <orderEntry type="jdk" jdkName="RVM: ruby-3.3.1 [global]" jdkType="RUBY_SDK" />
13
13
  <orderEntry type="sourceFolder" forTests="false" />
14
- <orderEntry type="library" scope="PROVIDED" name="rake (v13.1.0, RVM: ruby-3.3.1 [global]) [gem]" level="application" />
15
14
  </component>
16
15
  </module>
@@ -1,4 +1,4 @@
1
- # Cache Failover Gem [![Gem Version]]
1
+ # Cache Failover Gem
2
2
 
3
3
  ## Installation
4
4
 
Binary file
@@ -9,7 +9,7 @@ Gem::Specification.new do |gem|
9
9
  gem.authors = ["chronicaust"]
10
10
  gem.email = ["jamiep@supportabilit.com"]
11
11
  gem.summary = %q{ Failover Handling Cache Store for Rails w/ Brotli compression support. (Redis[Hiredis]/Memcached[Dalli]/SolidCache[MySQL/PG]) }
12
- gem.description = %q{ This gem enabled automatic failover to a secondary caching method when the primary fails. }
12
+ gem.description = %q{ This gem enables automatic failover to a secondary caching method when the primary fails. }
13
13
  gem.homepage = "https://github.com/chronicaust/cache_failover"
14
14
  gem.files = `git ls-files`.split("\n")
15
15
  gem.test_files = gem.files.grep(%r{^(spec)/})
@@ -148,9 +148,7 @@ module CacheFailover
148
148
  true
149
149
  end
150
150
 
151
- REDIS ||=
152
-
153
- private
151
+ private
154
152
 
155
153
  def redis_cnxn(init_options)
156
154
  @redis_cache_client ||=
@@ -163,6 +161,15 @@ module CacheFailover
163
161
  ).new_pool
164
162
  end
165
163
 
164
+ def dalli_cnxn(init_options)
165
+ @dalli_cache_client ||=
166
+ Dalli::Client.new(
167
+ CONFIG[:MEMCACHED_SERVERS],
168
+ failover: init_options[:failover] || true,
169
+ expires_in: init_options[:expires_in] || 300
170
+ )
171
+ end
172
+
166
173
  def cache_db_cnxn(init_options)
167
174
  @db_cache_client ||=
168
175
  ActiveRecord::Base.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CacheFailover
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cache_failover
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - chronicaust
@@ -206,7 +206,7 @@ dependencies:
206
206
  - - ">="
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
- description: " This gem enabled automatic failover to a secondary caching method when
209
+ description: " This gem enables automatic failover to a secondary caching method when
210
210
  the primary fails. "
211
211
  email:
212
212
  - jamiep@supportabilit.com
@@ -214,13 +214,14 @@ executables: []
214
214
  extensions: []
215
215
  extra_rdoc_files: []
216
216
  files:
217
- - ".idea/.gitignore"
217
+ - ".gitignore"
218
218
  - ".idea/CacheFailover.iml"
219
219
  - ".idea/modules.xml"
220
220
  - ".idea/vcs.xml"
221
+ - README.md
221
222
  - Rakefile
223
+ - cache_failover-0.1.0.gem
222
224
  - cache_failover.gemspec
223
- - lib/README.md
224
225
  - lib/cache_failover.rb
225
226
  - lib/cache_failover/store.rb
226
227
  - lib/cache_failover/version.rb