memcached_store 2.3.0 → 2.3.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/lib/active_support/cache/memcached_store.rb +14 -8
- data/lib/memcached_store/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cff56eb9da5ff4283dbdb070dbcccb23fcb59c834a3a4d66e158720b0a594fe6
|
4
|
+
data.tar.gz: 306470c390a690087d0bee0628b8f35300fe8330a818d51ec391ba522f3f6441
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c97659aad0e6f75d89005a2b69306ca3387395b1924f92563c195c97cc812fb82187908c11c557346ec9c1e705c5140f367a0e49b2919ed43487dd4e42dc508
|
7
|
+
data.tar.gz: 7c9b0891c23dddfe4f01aba246dd187393207d4a8962f491b358f32d8e0ee83b532eca81f64e670e609d1dfffa294d9a3f22a68bced26291aaff4cbea07f8e01
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# file havily based out off https://github.com/rails/rails/blob/3-2-stable/activesupport/lib/active_support/cache/mem_cache_store.rb
|
2
2
|
require 'digest/md5'
|
3
|
+
require 'delegate'
|
3
4
|
|
4
5
|
module ActiveSupport
|
5
6
|
module Cache
|
@@ -215,21 +216,21 @@ module ActiveSupport
|
|
215
216
|
private
|
216
217
|
|
217
218
|
if private_method_defined?(:read_serialized_entry)
|
218
|
-
class
|
219
|
+
class DupLocalStore < DelegateClass(Strategy::LocalCache::LocalStore)
|
219
220
|
def write_entry(_key, entry)
|
220
221
|
if entry.is_a?(Entry)
|
221
|
-
entry.dup_value!
|
222
|
+
entry.dup_value!
|
222
223
|
end
|
223
224
|
super
|
224
225
|
end
|
225
226
|
|
226
227
|
def fetch_entry(key)
|
227
|
-
entry =
|
228
|
+
entry = super do
|
228
229
|
new_entry = yield
|
229
230
|
if entry.is_a?(Entry)
|
230
231
|
new_entry.dup_value!
|
231
232
|
end
|
232
|
-
|
233
|
+
new_entry
|
233
234
|
end
|
234
235
|
entry = entry.dup
|
235
236
|
|
@@ -241,12 +242,17 @@ module ActiveSupport
|
|
241
242
|
end
|
242
243
|
end
|
243
244
|
|
244
|
-
module
|
245
|
-
|
246
|
-
|
245
|
+
module DupLocalCache
|
246
|
+
private
|
247
|
+
|
248
|
+
def local_cache
|
249
|
+
if local_cache = super
|
250
|
+
DupLocalStore.new(local_cache)
|
251
|
+
end
|
247
252
|
end
|
248
253
|
end
|
249
|
-
|
254
|
+
|
255
|
+
prepend DupLocalCache
|
250
256
|
|
251
257
|
def read_entry(key, **options) # :nodoc:
|
252
258
|
deserialize_entry(read_serialized_entry(key, **options))
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: memcached_store
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Camilo Lopez
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2021-
|
14
|
+
date: 2021-08-02 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|