File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ruby and the fly likes Caching in Rails application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Languages » Ruby
Bookmark "Caching in Rails application " Watch "Caching in Rails application " New topic
Author

Caching in Rails application

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8898

Is caching supported in Rails to improve application performace ?


Groovy
Justin Gehtland
author
Ranch Hand

Joined: Jan 30, 2007
Posts: 31
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

Joined: Feb 27, 2002
Posts: 8898

Thank you Justin. Caching in Rails looks really
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Caching in Rails application
 
Similar Threads
Connecting different database to a single application
Clustering ruby applications
website building?
Which is the hottest Java Technolgy?
What does plugin exactly means