Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6702139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:01:10+00:00 2026-05-26T07:01:10+00:00

Caching is something that I kind of ignored for a long time, as projects

  • 0

Caching is something that I kind of ignored for a long time, as projects that I worked on were on local intranets with very little activity. I’m working on a much larger Rails 3 personal project now, and I’m trying to work out what and when I should cache things.

  1. How do people generally determine this?
  2. If I know a site is going to be relatively low-activity, should I just cache every single page?
  3. If I have a page that calls several partials, is it better to do fragment caching in those partials, or page caching on those partials?

The Ruby on Rails guides did a fine job of explaining how caching in Rails 3 works, but I’m having trouble understanding the decision-making process associated with it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:01:12+00:00Added an answer on May 26, 2026 at 7:01 am

    Don’t ever cache for the sake of it, cache because there’s a need (with the exception of something like the homepage, which you know is going to be super popular.) Launch the site, and either parse your logs or use something like NewRelic to see what’s slow. From there, you can work out what’s worth caching.

    Generally though, if something takes 500ms to complete, you should cache, and if it’s over 1 second, you’re probably doing too much in the request, and you should farm whatever you’re doing to a background process…for example, fetching a Twitter feed, or manipulating images.

    EDIT: See apneadiving’s answer too, he links to some great screencasts (albeit based on Rails 2, but the theory is the same.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok, I have just run into something that is really catching me off-guard. I
I'm caching tweets on my site (with 30 min expiration time). When the cache
To allow caching a PHP generated file, I want to make sure, that the
Background: I'm working on a single page web app that loads everything through AJAX
I am working with Magento, and there is a function that merges CSS and
For a few projects I'm working on I need a persistent key value store
Suppose I have a strongly typed caching interface that I want to mock. It
I'm having trouble with caching on my website. I have static files that should
I have to develop something like a game of life. For that, I have
What caching mechanism should I use for a .Net web application? Memcached seems to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.