TTT
TTT

Reputation: 6895

Rails page caching expires_in

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?

Upvotes: 4

Views: 3035

Answers (1)

Nick Kugaevsky
Nick Kugaevsky

Reputation: 2945

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

Upvotes: 3

Related Questions