lib/cachetastic/cache.rb in cachetastic-3.5.3 vs lib/cachetastic/cache.rb in cachetastic-3.6.0

- old
+ new

@@ -70,11 +70,11 @@ # If there is an the expiry_swing setting is configured it will be +/- to the # expiry time. def set(key, value, expiry_time = nil) do_with_logging(:set, key) do retryable do - self.adapter.set(key, value, calculate_expiry_time(expiry_time)) + self.adapter.set(key, adapter.marshal(value), calculate_expiry_time(expiry_time)) end end end # set # Deletes an object from the cache. @@ -172,9 +172,10 @@ logger.debug(:starting, action, cache_klass.name, key) res = yield if block_given? end_time = Time.now str = '' unless res.nil? + res = adapter.unmarshal(res) str = "[#{res.class.name}]" str << "\t[Size = #{res.size}]" if res.respond_to? :size str << "\t" << res.inspect end logger.debug(:finished, action, cache_klass.name, key, (end_time - start_time), str) \ No newline at end of file