cache_store_redis 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e83f4625b064a5084ac1a7f4b74062311a471901a50a43e529b78cf2c9e0d44
4
- data.tar.gz: 5e6c6d90998cd4650c62653b1b8aff2f3d0f6711d9c7123168a87500b394de22
3
+ metadata.gz: d0f374c4d132bae6c04d9ee020e80b1cb4096195bc3f3cc20fd99384af725742
4
+ data.tar.gz: b719b7f0ace91c081c205e70ce4b92b84c590d1900aa1b816f8c7b9af8fc282b
5
5
  SHA512:
6
- metadata.gz: 00af5701b9b7ea343346fdc89b9273887041ea6c68fea7bc2c3188f6b232c238a24d76db9890c7c5102fc3f48d7641abe628b4b0c11c46b614684f621491b12f
7
- data.tar.gz: 1cd61ba1fb82743666ded174096aa55b7ce494c1dd0ee80016b95ff495e9069d261e5e8697db65d391dee59ca6b8a458b648a94b2004d575a68b370a848eb9e6
6
+ metadata.gz: c842cde90f293a67ee5a4f20c377ea8599b182ad2d9f2b4991201d8b1b6eae7f949323fe0cdf5c6326f9d03eb36bce239ef00b0b0190c1953e35e68da79b9ddf
7
+ data.tar.gz: d966f962f08cbcf76e47bae98c09f913fa30803351dd969219b27ce7f4583b8171245548d6e738e5681fe351ed9b362fe97cd67609229c8de5885920335b6649
@@ -85,6 +85,10 @@ class OptionalRedisCacheStore
85
85
  false
86
86
  end
87
87
 
88
+ alias read get
89
+ alias write set
90
+ alias delete remove
91
+
88
92
  private
89
93
 
90
94
  def handle_error(ex, msg)
@@ -4,7 +4,7 @@ class RedisCacheStore
4
4
  DEFAULT_TTL = 3_600
5
5
 
6
6
  def initialize(namespace = nil, config = nil)
7
- @connection_pool = RedisConnectionPool.new(config)
7
+ @connection_pool = RedisConnectionPool.new(namespace, config)
8
8
 
9
9
  @namespace = namespace
10
10
  @config = config
@@ -72,7 +72,7 @@ class RedisCacheStore
72
72
  end
73
73
 
74
74
  expiry_int = Integer(expires_in)
75
- expire_value = expiry_int.positive? ? expiry_int : DEFAULT_TTL
75
+ expire_value = expiry_int.positive? ? expiry_int : Integer(DEFAULT_TTL)
76
76
 
77
77
  with_client do |client|
78
78
  client.multi do
@@ -127,7 +127,7 @@ class RedisCacheStore
127
127
  # @return [Boolean] True or False to specify if the key exists in the cache store.
128
128
  def exist?(key)
129
129
  with_client do |client|
130
- client.exists(build_key(key))
130
+ !client.exists(build_key(key)).zero?
131
131
  end
132
132
  end
133
133
 
@@ -140,6 +140,10 @@ class RedisCacheStore
140
140
  end
141
141
  end
142
142
 
143
+ alias write set
144
+ alias read get
145
+ alias delete remove
146
+
143
147
  private
144
148
 
145
149
  def serialize(object)
@@ -1,3 +1,3 @@
1
1
  module CacheStoreRedis
2
- VERSION = '2.1.0'
2
+ VERSION = '2.2.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cache_store_redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaughanbrittonsage
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-05 00:00:00.000000000 Z
11
+ date: 2022-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: pry-byebug
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rake
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -81,7 +95,7 @@ dependencies:
81
95
  - !ruby/object:Gem::Version
82
96
  version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
- name: redis
98
+ name: oj
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
101
  - - ">="
@@ -95,7 +109,7 @@ dependencies:
95
109
  - !ruby/object:Gem::Version
96
110
  version: '0'
97
111
  - !ruby/object:Gem::Dependency
98
- name: oj
112
+ name: redis
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
115
  - - ">="
@@ -142,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
156
  - !ruby/object:Gem::Version
143
157
  version: '0'
144
158
  requirements: []
145
- rubygems_version: 3.0.2
159
+ rubygems_version: 3.1.2
146
160
  signing_key:
147
161
  specification_version: 4
148
162
  summary: This is the redis cache_store implementation.