lib/active_support/cache/dalli_store23.rb in dalli-1.0.0 vs lib/active_support/cache/dalli_store23.rb in dalli-1.0.1

- old
+ new

@@ -35,10 +35,11 @@ addresses = addresses.flatten options = addresses.extract_options! mem_cache_options = options.dup @namespace = mem_cache_options.delete(:namespace) + @expires_in = mem_cache_options[:expires_in] @data = self.class.build_mem_cache(*(addresses + [mem_cache_options])) extend Strategy::LocalCache end @@ -152,10 +153,10 @@ private # Exists in 2.3.8 but not in 2.3.2 so roll our own version def expires_in(options) - expires_in = options && options[:expires_in] + expires_in = (options && options[:expires_in]) || @expires_in raise ":expires_in must be a number" if expires_in && !expires_in.is_a?(Numeric) expires_in || 0 end \ No newline at end of file