4

In an arbitrary Rails controller will the line below work?

caches_page :show, :expires_in => 1.days

I use memcached, but am confused by how page caching works. Does it use the file system or will it put the pages in memory with memcached?

EDIT: it appears that it will use the file system. So is there a simple way to automatically release the page from cache after a given time or do I have to write a sweeper?

TTT
  • 6,505
  • 10
  • 56
  • 82
  • 2
    you can refer http://stackoverflow.com/questions/5807798/page-caching-with-memcached – Amar Sep 06 '12 at 12:10

1 Answers1

3

Rails cache method depends on your settings in application.

Check you config/environments directory files for config.cache_store option.

Official guides for caching in rails: http://guides.rubyonrails.org/caching_with_rails.html

Nick Kugaevsky
  • 2,935
  • 1
  • 18
  • 22