memcached_store 2.0.0 → 2.0.1

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
  SHA1:
3
- metadata.gz: a079d5cd404dd9b93e6fad358bc8cfc0653321d1
4
- data.tar.gz: cddd7f7356b0baadc7149993de366818fec77d54
3
+ metadata.gz: aa72b41fd6b6cb58a042294012e8f736c3b5ef62
4
+ data.tar.gz: e053cc731f76cb2bc909e36f7f004002b2fd7e38
5
5
  SHA512:
6
- metadata.gz: 98b7e22428228d6fabcf36ad364f4f9b119ae1ede6be0e795724ab3989e524ec7ec41e855cc6598a0c6bf6abc00d28bb25c1e679c427948ba69c545b556a777c
7
- data.tar.gz: 599a6385c622f6e41a7124d7c27bd7d14754755ffae61035c860989720b57e87fa5a1b5d553ae5b36211c85d3e375c9637fbeda48522d3d68a664abc03b57425
6
+ metadata.gz: 2045826e00f5d2c2d988eed051036713348bafcd7867bf06b1f6760decea9719e62a0cfc332ee82f3e3ef84f2eecb65ab7eba373f1e969f5592cfa53eb12a034
7
+ data.tar.gz: c36fde971c9abc498626b8662cb87977369e85c3818efbbb5bf23bf0ec0bf51e9a17e338dce98661c41b7fdb2abbf7fc6a1a271bea0cb0a8fd177e8f9e5dccf7
@@ -247,13 +247,21 @@ module ActiveSupport
247
247
  rescue Memcached::NotFound, Memcached::ConnectionDataExists
248
248
  on_miss
249
249
  rescue Memcached::Error => e
250
- logger.warn(
251
- "[MEMCACHED_ERROR] swallowed=#{@swallow_exceptions} exception_class=#{e.class} exception_message=#{e.message}"
252
- ) if logger
250
+ log_warning(e)
253
251
  raise unless @swallow_exceptions
254
252
  return_value_on_error
255
253
  end
256
254
 
255
+ def log_warning(err)
256
+ return unless logger
257
+ return if err.is_a?(Memcached::NotStored) && @swallow_exceptions
258
+
259
+ logger.warn(
260
+ "[MEMCACHED_ERROR] swallowed=#{@swallow_exceptions}" \
261
+ " exception_class=#{err.class} exception_message=#{err.message}"
262
+ )
263
+ end
264
+
257
265
  ActiveSupport.run_load_hooks(:memcached_store)
258
266
  end
259
267
  end
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module MemcachedStore
3
- VERSION = "2.0.0"
3
+ VERSION = "2.0.1"
4
4
  end
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.0.0
4
+ version: 2.0.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: 2018-08-07 00:00:00.000000000 Z
14
+ date: 2018-08-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport