api_cache 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/api_cache.gemspec +1 -1
- data/lib/api_cache.rb +2 -2
- metadata +1 -1
data/api_cache.gemspec
CHANGED
data/lib/api_cache.rb
CHANGED
@@ -109,7 +109,7 @@ class APICache
|
|
109
109
|
cache.set(value)
|
110
110
|
value
|
111
111
|
rescue => e
|
112
|
-
APICache.logger.info "APICache #{
|
112
|
+
APICache.logger.info "APICache #{key}: Exception raised (#{e.message} - #{e.class})" \
|
113
113
|
|
114
114
|
# No point outputting backgraces for internal APICache errors
|
115
115
|
APICache.logger.debug "Backtrace:\n#{e.backtrace.join("\n")}" unless e.kind_of?(APICacheError)
|
@@ -117,7 +117,7 @@ class APICache
|
|
117
117
|
if cache_state == :refetch
|
118
118
|
cache.get
|
119
119
|
else
|
120
|
-
APICache.logger.warn "APICache #{
|
120
|
+
APICache.logger.warn "APICache #{key}: Data not available in the cache or from API"
|
121
121
|
if options.has_key?(:fail)
|
122
122
|
fail = options[:fail]
|
123
123
|
fail.respond_to?(:call) ? fail.call : fail
|