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 +4 -4
- data/{.idea/.gitignore → .gitignore} +3 -0
- data/.idea/CacheFailover.iml +0 -1
- data/{lib/README.md → README.md} +1 -1
- data/cache_failover-0.1.0.gem +0 -0
- data/cache_failover.gemspec +1 -1
- data/lib/cache_failover/store.rb +10 -3
- data/lib/cache_failover/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1dc6c8a3ec9341137a0873d4c4beb2603f0bf64fadb23f5a0fc3712852a6b216
|
4
|
+
data.tar.gz: d3b7b20bd41accc9cbae4618eb1c05237c8968cf7d841c02dafe47c90b763451
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3c0cbb11b456521b80c803af725411614192b9eb64aa729fb651faa40d7037efd07456502e00e54b5126a5f7df2ea42877a4333246cadeda58bae0dcdeff08a
|
7
|
+
data.tar.gz: 5386790fa9e513fb28508a0cc4ddbc6ce809325d5edca06c00a88076e586dbc132429fd302867e2b7e10d1084aa62cce02b54d898f04bfb8bbc0f44f7341a8b0
|
data/.idea/CacheFailover.iml
CHANGED
@@ -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>
|
data/{lib/README.md → README.md}
RENAMED
Binary file
|
data/cache_failover.gemspec
CHANGED
@@ -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
|
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)/})
|
data/lib/cache_failover/store.rb
CHANGED
@@ -148,9 +148,7 @@ module CacheFailover
|
|
148
148
|
true
|
149
149
|
end
|
150
150
|
|
151
|
-
|
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.
|
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.
|
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
|
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
|
-
- ".
|
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
|