diff --git a/lib/identity_cache/cache_fetcher.rb b/lib/identity_cache/cache_fetcher.rb index 7122b934..4ed1b7f7 100644 --- a/lib/identity_cache/cache_fetcher.rb +++ b/lib/identity_cache/cache_fetcher.rb @@ -234,7 +234,8 @@ def fallback_key_expiration_options(fill_lock_duration) # the cache store round down with `to_i` expires_in = expires_in.ceil - # memcached TTL only gets part of the first second, so increase TTL by 1 to compensate + # memcached TTL only gets part of the first second (https://github.com/memcached/memcached/issues/307), + # so increase TTL by 1 to compensate expires_in += 1 { expires_in: expires_in }