cache_failover 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1dc6c8a3ec9341137a0873d4c4beb2603f0bf64fadb23f5a0fc3712852a6b216
4
- data.tar.gz: d3b7b20bd41accc9cbae4618eb1c05237c8968cf7d841c02dafe47c90b763451
3
+ metadata.gz: ed9e82f26ea1cb43e4b188cee7620bb345adba1f320144e3eee891c8b6eba03c
4
+ data.tar.gz: 702f7c9c24287051704a9bc56c5a758db81d764cf5a3b26204ae3dc7b3ae529b
5
5
  SHA512:
6
- metadata.gz: e3c0cbb11b456521b80c803af725411614192b9eb64aa729fb651faa40d7037efd07456502e00e54b5126a5f7df2ea42877a4333246cadeda58bae0dcdeff08a
7
- data.tar.gz: 5386790fa9e513fb28508a0cc4ddbc6ce809325d5edca06c00a88076e586dbc132429fd302867e2b7e10d1084aa62cce02b54d898f04bfb8bbc0f44f7341a8b0
6
+ metadata.gz: 84a2ebf66e5e039fb714bff24879fc52aa63d76aa80434dd69f85fdcb24fbfa4763e32996288f8cc55b95dde9ef1f09693f68acacd2c1f98fe0c3137bb4b6c8d
7
+ data.tar.gz: bb2fadf0c46ecd0a4bcd28b7ffbc7535badc43aac63f23937007136a069256d508745d177113c82102a8da50f2d168cb4de1720b7595b356baa514a9c8de5ee1
data/README.md CHANGED
@@ -25,6 +25,10 @@ Configure your cache_store normally, but use `CacheFailover::Store` with one arg
25
25
  ```ruby
26
26
  config.cache_store = CacheFailover::Store.new(
27
27
  [
28
+ {
29
+ store: ActiveSupport::Cache::MemCacheStore.new(CONFIG[:MEMCACHED_SERVERS], {}),
30
+ options: {}
31
+ },
28
32
  {
29
33
  store: ActiveSupport::Cache::RedisCacheStore.new(
30
34
  url: CONFIG[:REDIS_URL],
@@ -43,7 +47,6 @@ config.cache_store = CacheFailover::Store.new(
43
47
  ```
44
48
 
45
49
  ## WIP
46
- - Dalli/Memcached support
47
50
  - Memory Cache Support
48
51
  - File Cache support
49
52
  - More options
@@ -185,6 +185,10 @@ module CacheFailover
185
185
  when 'ActiveSupport::Cache::RedisCacheStore'
186
186
  (redis_cnxn(init_options).call('ping') == 'PONG' rescue false)
187
187
  when 'ActiveSupport::Cache::MemCacheStore'
188
+ dalli_cnxn(init_options).alive!
189
+ dalli_cnxn(init_options).delete('cache_test')
190
+ dalli_cnxn(init_options).add('cache_test', 'success')
191
+ dalli_cnxn(init_options).get('cache_test') == 'success'
188
192
  when 'SolidCache::Store'
189
193
  cache_db_cnxn(init_options).with_connection { ActiveRecord::Base.connection.select_value('SELECT 1=1') == 1 }
190
194
  when 'ActiveSupport::Cache::MemoryStore'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CacheFailover
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
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.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - chronicaust