mperham/dalli — Issue #135: expires_in in being auto increased?
Author: softwaregravy
Created: 2011-11-03 18:28:09+00:00
State: open

Referencing:
https://github.com/mperham/dalli/blob/master/lib/active_support/cache/dalli_store.rb#L136

expires_in = options[:expires_in].to_i
if expires_in > 0 && !options[:raw]
# Set the memcache expire a few minutes in the future to support race condition ttls on read
expires_in += 5.minutes
end

This appears to always be adding 5 minutes to expiration times. Am I reading that correctly? Why would we do that? what's the ttls race condition? and how does adding 5 minutes prevent it?

The reason I'm asking is because I have `:expires_in => 10.minutes` in my code and expecting the entries to expire in 10 minutes, but they appear to be sticking around for a bit longer. (I'm guessing 15?)