Fix ArgumentError in ActiveSupport::Cache::CacheStore.read_multi #2393

Merged
merged 1 commit into from Aug 1, 2011

Projects

None yet

2 participants

@bdurand

There is a call in activesupport-3.0.9/lib/active_support/cache.rb#read_multi to delete entry (on or about line 348). This breaks the call in both 3.0.x and 3.1 branches with any cache other than MemCacheStore.. The change is trivial so the code is below. Also added a test case.

  if entry.expired?
    delete_entry(key)
  else
    results[name] = entry.value
  end

Unfortunately, the delete_entry method takes two arguments. It should be:

  if entry.expired?
    delete_entry(key, options)
  else
    results[name] = entry.value
  end
@spastorino spastorino merged commit 6e701e8 into rails:master Aug 1, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment