Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to develop and test cache in a Ruby on rails application?

I am using Ruby on Rails 3 and I would like to start "to code" the cache system.

I am working on localhost in development mode. I heard that working in development mode it is possible to face some "confusing" errors. Why? What is the best way to that cache?

like image 914
user502052 Avatar asked Dec 28 '22 00:12

user502052


1 Answers

You just need a clear mind.

In development.rb, change this:

  config.action_controller.perform_caching = true

Then work and test. It will write the cached pages in /public, and fragments in /tmp/cache

Here are great articles to understand caching in Rails:

http://broadcastingadam.com/2012/07/advanced_caching_revised

like image 148
apneadiving Avatar answered Dec 31 '22 13:12

apneadiving