Delete all cache

416 views
Skip to first unread message

Luk Mus

unread,
Oct 25, 2011, 12:46:20 AM10/25/11
to rubyonra...@googlegroups.com
Is it possible to delete all rails cache? how?
'rake tmp:clear' doesn't work.

config/envinroments/production.rb:
...
config.cache_store =:file_store, 'tmp/cache/'
...

tmp/cache is empty, but page is still cached.

--
Posted via http://www.ruby-forum.com/.

Roy Situmorang

unread,
Oct 25, 2011, 1:49:21 AM10/25/11
to rubyonra...@googlegroups.com
Page cache is standard behaviour of "production" environment.
Well, I suggest you to change the environment to "development".


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.


Colin Law

unread,
Oct 25, 2011, 3:07:37 AM10/25/11
to rubyonra...@googlegroups.com
On 25 October 2011 05:46, Luk Mus <li...@ruby-forum.com> wrote:
> Is it possible to delete all rails cache? how?
> 'rake tmp:clear' doesn't work.
>
> config/envinroments/production.rb:
> ...
> config.cache_store =:file_store, 'tmp/cache/'
> ...
>
> tmp/cache is empty, but page is still cached.

Are you sure it is not your browser that is caching it?

Colin

>
> --
> Posted via http://www.ruby-forum.com/.
>

> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

--
gplus.to/clanlaw

Jeffrey L. Taylor

unread,
Oct 25, 2011, 11:51:18 AM10/25/11
to rubyonra...@googlegroups.com
Quoting Luk Mus <li...@ruby-forum.com>:
> Is it possible to delete all rails cache? how?
> 'rake tmp:clear' doesn't work.
>
> config/envinroments/production.rb:
> ...
> config.cache_store =:file_store, 'tmp/cache/'
> ...
>

Try restarting the Rails server, Webrick, Apache, whatever.

HTH,
Jeffrey

Brandon Black

unread,
Oct 28, 2011, 7:50:13 PM10/28/11
to Ruby on Rails: Talk
Sweepers:
http://guides.rubyonrails.org/caching_with_rails.html#sweepers

If you do just want to blow away everything, you can iterate through
the keys in the cache store and explicitly delete each one. Probably
not necessary though.
If the problem you're having is with static assets, the other comment
about this being a client-side caching issue might be valid.
Reply all
Reply to author
Forward
0 new messages