cache_store_redis 2.2.1 → 2.3.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cache_store_redis/redis_cache_store.rb +14 -2
- data/lib/cache_store_redis/version.rb +1 -1
- data/lib/cache_store_redis.rb +0 -1
- metadata +4 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0b34e1faf2a1926b9c7c03789d0fe9a2e36e09c012cee50f397db718bf4b57b
|
4
|
+
data.tar.gz: b345875f72393ec7c847cc0f8c763044ba06d0889d7033230ba0791b79ce0392
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 044eafe52905832a9d8c11dbbc880de86cf0f0c7eba6a1e35ea8655727bed97613b8efb43b0909deeaa62e4198dacfc15450382d3b7759af4c6c7d336455ec36
|
7
|
+
data.tar.gz: 89ea0aa167f3feeceeaee5ba3bbb5656efcf1a9ce04afa2ca18e1f4d8a602d7724f4fec7e4dfea26ac13121de39d6859baa90413c10499da8dfad97183749a29
|
@@ -4,6 +4,10 @@ class RedisCacheStore
|
|
4
4
|
DEFAULT_TTL = 3_600
|
5
5
|
|
6
6
|
def initialize(namespace = nil, config = nil)
|
7
|
+
unless RUBY_PLATFORM == 'java'
|
8
|
+
require 'oj'
|
9
|
+
end
|
10
|
+
|
7
11
|
@connection_pool = RedisConnectionPool.new(namespace, config)
|
8
12
|
|
9
13
|
@namespace = namespace
|
@@ -143,11 +147,19 @@ class RedisCacheStore
|
|
143
147
|
private
|
144
148
|
|
145
149
|
def serialize(object)
|
146
|
-
|
150
|
+
if RUBY_PLATFORM == 'java'
|
151
|
+
Marshal::dump(object)
|
152
|
+
else
|
153
|
+
Oj.dump(object)
|
154
|
+
end
|
147
155
|
end
|
148
156
|
|
149
157
|
def deserialize(object)
|
150
|
-
|
158
|
+
if RUBY_PLATFORM == 'java'
|
159
|
+
Marshal::load(object)
|
160
|
+
else
|
161
|
+
Oj.load(object)
|
162
|
+
end
|
151
163
|
end
|
152
164
|
|
153
165
|
def build_key(key)
|
data/lib/cache_store_redis.rb
CHANGED
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.
|
4
|
+
version: 2.3.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vaughanbrittonsage
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -24,20 +24,6 @@ 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'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: rake
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -152,9 +138,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
152
138
|
version: '0'
|
153
139
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
140
|
requirements:
|
155
|
-
- - "
|
141
|
+
- - ">"
|
156
142
|
- !ruby/object:Gem::Version
|
157
|
-
version:
|
143
|
+
version: 1.3.1
|
158
144
|
requirements: []
|
159
145
|
rubygems_version: 3.3.5
|
160
146
|
signing_key:
|