active_remote-cached 0.1.4 → 0.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
- SHA1:
3
- metadata.gz: da0c6caa85c4c4bc50f0df7e6b3315783b546628
4
- data.tar.gz: 408733b9f1a0708bbd7fb8289df0d55c454efe1c
2
+ SHA256:
3
+ metadata.gz: b940a638579d7d52f0802cc3e92b8345135557bd44298fed674a896c885be7dc
4
+ data.tar.gz: 651e879207165b7b5ad651f73dabea9035e074f0d15e54ba8b9d6ea3d00d40c6
5
5
  SHA512:
6
- metadata.gz: 535e2f65f6933679c321832536c61d3048399ea18899403d090f8dfe5f74c885b45e13bac36933e4b7732a05d106e6e277bf391539f2ff40dbb145c4476b0622
7
- data.tar.gz: 240613cf4187528adf150f8ff7b6e3ab111b12653b4fdf45ca62e635a66566635a6d9a285a1246758b3c00ebc84677e49b1a510059da52e3e0281c5e151250ca
6
+ metadata.gz: be9de4a2047ea7fa752e933a2174e7dc8a5ac17a671bb800a2c481295b4a5eaccfd0cb4e90b71ccd091d75892721e91fea4135f6b14e4b956a1256403cbc21e7
7
+ data.tar.gz: 316686976d44d6f44731d358602c6b16ab5ce9c781a828f0202b1f68eaedb2bc559720487404f0ade6b2a23b22d37c5ee7d5ee4c5f813cbea30741be58ff388a
@@ -12,6 +12,10 @@ module ActiveRemote
12
12
  module Cached
13
13
  extend ::ActiveSupport::Concern
14
14
 
15
+ # When upgrading Rails versions, don't reuse the same cache key, because you can't rely upon the serialized objects to be consistent across versions.
16
+ # To fix, this adds a cache key that caches the ruby engine version and the activesupport version to prevent cache re-use across different versions.
17
+ RUBY_AND_ACTIVE_SUPPORT_VERSION = "#{RUBY_ENGINE_VERSION}:#{ActiveSupport::VERSION::STRING}".freeze
18
+
15
19
  def self.cache(cache_provider = nil)
16
20
  if cache_provider
17
21
  @cache_provider = ::ActiveRemote::Cached::Cache.new(cache_provider)
@@ -144,6 +148,7 @@ module ActiveRemote
144
148
  __active_remote_cached_options = ::ActiveRemote::Cached.default_options.merge(#{cached_finder_options}).merge(__active_remote_cached_options)
145
149
  namespace = __active_remote_cached_options.delete(:namespace)
146
150
  find_cache_key = [
151
+ RUBY_AND_ACTIVE_SUPPORT_VERSION,
147
152
  namespace,
148
153
  name,
149
154
  "#find",
@@ -151,6 +156,7 @@ module ActiveRemote
151
156
  ].compact
152
157
 
153
158
  search_cache_key = [
159
+ RUBY_AND_ACTIVE_SUPPORT_VERSION,
154
160
  namespace,
155
161
  name,
156
162
  "#search",
@@ -176,6 +182,7 @@ module ActiveRemote
176
182
  __active_remote_cached_options = ::ActiveRemote::Cached.default_options.merge(#{cached_finder_options}).merge(__active_remote_cached_options)
177
183
  namespace = __active_remote_cached_options.delete(:namespace)
178
184
  cache_key = [
185
+ RUBY_AND_ACTIVE_SUPPORT_VERSION,
179
186
  namespace,
180
187
  name,
181
188
  "#find",
@@ -202,6 +209,7 @@ module ActiveRemote
202
209
  __active_remote_cached_options = ::ActiveRemote::Cached.default_options.merge(#{cached_finder_options}).merge(__active_remote_cached_options)
203
210
  namespace = __active_remote_cached_options.delete(:namespace)
204
211
  cache_key = [
212
+ RUBY_AND_ACTIVE_SUPPORT_VERSION,
205
213
  namespace,
206
214
  name,
207
215
  "#search",
@@ -241,6 +249,7 @@ module ActiveRemote
241
249
  __active_remote_cached_options = ::ActiveRemote::Cached.default_options.merge(#{cached_finder_options}).merge(__active_remote_cached_options)
242
250
  namespace = __active_remote_cached_options.delete(:namespace)
243
251
  cache_key = [
252
+ RUBY_AND_ACTIVE_SUPPORT_VERSION,
244
253
  namespace,
245
254
  name,
246
255
  "#find",
@@ -288,6 +297,7 @@ module ActiveRemote
288
297
  __active_remote_cached_options = ::ActiveRemote::Cached.default_options.merge(#{cached_finder_options}).merge(__active_remote_cached_options)
289
298
  namespace = __active_remote_cached_options.delete(:namespace)
290
299
  cache_key = [
300
+ RUBY_AND_ACTIVE_SUPPORT_VERSION,
291
301
  namespace,
292
302
  name,
293
303
  "#search",
@@ -340,6 +350,7 @@ module ActiveRemote
340
350
  __active_remote_cached_options = ::ActiveRemote::Cached.default_options.merge(#{cached_finder_options}).merge(__active_remote_cached_options)
341
351
  namespace = __active_remote_cached_options.delete(:namespace)
342
352
  cache_key = [
353
+ RUBY_AND_ACTIVE_SUPPORT_VERSION,
343
354
  namespace,
344
355
  name,
345
356
  "#search",
@@ -1,5 +1,5 @@
1
1
  module ActiveRemote
2
2
  module Cached
3
- VERSION = "0.1.4"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_remote-cached
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Dewitt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-06 00:00:00.000000000 Z
11
+ date: 2020-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_remote
@@ -139,8 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  - !ruby/object:Gem::Version
140
140
  version: '0'
141
141
  requirements: []
142
- rubyforge_project:
143
- rubygems_version: 2.5.1
142
+ rubygems_version: 3.0.1
144
143
  signing_key:
145
144
  specification_version: 4
146
145
  summary: Provides a configuration for caching mechanisms and finders on ActiveRemote