• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Caching in Rails application

 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is caching supported in Rails to improve application performace ?
 
author
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. Rails supports caching at several levesls:

1) full page output. When templates are rendered, they can be stored in the /public folder automatically as HTML for future rendering. This can be scheduled to timeout at certain intervals using a filter.

2) partial page output. The results of rendering partials can be cached for future inclusion into another template.

3) action caching. The results of running a controller action can be cached for use in another template.

I actually find the caching strategies in Rails easier to manage than in other web frameworks.

The only caching that Rails does NOT support natively is object caching. ActiveRecord does not have a native second-level cache for the objects loaded from the database. You can use the optional acts_as_cached plugin, which uses memcached as its storage device, which is localized second-level caching. As far as I know, there is no native, clustered second-level cache for data objects.
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Justin. Caching in Rails looks really
 
An elephant? An actual elephant. Into the apartment. How is the floor still here. Hold this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic