:expires_in not working with memcache/fragment caching?

Hi all,

I’m using memcache (which support the :expires_in option) and I’m
using it in a view to cache a certain piece of HTML, somewhat like:

<% cache :expires_in => 10.minutes %>
some HTML
<% end %>

Funny thing is that I can see in memcache that the key is being set:

set views/localhost:3000/gids?expires_in=600 0 0 6619

However, as you can see the :expires_in is being passed as part of the
key and not as the expiration flag in memcache (the second 0 should be

Is there anything I’m doing wrong here?

Kind regards,

Sjoerd Tieleman.

Well, I’ve solved my own problem. You need to explicitly specify a key
before you can supply any options. Otherwise the options will be added
to the key.

Kind regards,

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs