This project is archived and is in readonly mode.

#6063 ✓resolved
Igor Galeta

Type error in ActiveSupport::Cache::Store documentation. Section fetch.

Reported by Igor Galeta | November 25th, 2010 @ 09:27 AM

On page type error in options for method fetch(name, options = nil):

Setting :expires_in ... :

 cache = => 5.minutes)
 cache.write(key, value, :expire_in => 1.minute)  # Set a lower value for one entry

In example settings must be "expires_in" not "expire_in".
Some code from mem_cache_store.rb:

 # Write an entry to the cache.
 def write_entry(key, entry, options) # :nodoc:
   method = options && options[:unless_exist] ? :add : :set
   value = options[:raw] ? entry.value.to_s : entry
   expires_in = options[:expires_in].to_i

Code use option "expires_in".

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>