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

I am using Ruby on Rails 3, and I would like to start coding the caching system.

I am working on localhost in development mode. I heard that when working in development mode, you may encounter some "confusing" errors. Why? What is the best way for this cache?

+4
source share
1 answer

You just need a clear mind.

In development.rb change this:

  config.action_controller.perform_caching = true 

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

Here are some great articles to understand caching in Rails:

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

+10
source

Source: https://habr.com/ru/post/1342008/


All Articles