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 4067206
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:13:13+00:00 2026-05-20T16:13:13+00:00

I have a rails blog app that was working well.. However, I did some

  • 0

I have a rails blog app that was working well.. However, I did some experiments with caching and in spite of having reverted to a previous version, something is still wrong here.

It seems that all pages are in cache or something like that (I have already cleaned my browser cache) as server logs do not show any get to database.

Any clue about how to solve this?
Thanks!

  • 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-20T16:13:14+00:00Added an answer on May 20, 2026 at 4:13 pm

    The problem is probably that you were using page caching like this:

    class ProductsController
      caches_page :index
      def index
        @products = Product.all
      end
    end
    

    This actually creates a file called products.html in your /public directory, so instead of even hitting the Rails stack this file is rendered. Clearing your browser cache doesn’t solve the problem because the file is stored on the server. There are two ways to expire this cache.

    The first one is to create an action to clear the cache, and then call that action whenever you want to clear the cache:

    class ProductsController
      def clear
        expire_page :action => :index
      end
    end
    

    The second way to do this is to simply remove the .html file from your command line (bash):

    rm public/products.html
    

    Page caching is confusing for this reason. It’s hard to tell when a page is actually cached and where it is stored.

    P.S: If you were not using page caching then you can clear your entire memcached cahce or memory cache using this command:

    Rails.cache.clear
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a rails 3.2 app that basically acts as a blog
I have a simple Rails 3 blog app that needs an admin user so
I have some functionality in a rails 3.2 app that needs to be driven
In my Rails app, I have an infinite page that loads more blog posts
I have a rails app that uses partials and in development everything works great
I have a rails app that I've been testing on heroku, it's a simple
I have a simple rails 3 blog app where posts have many comments and
I have built a Ruby on Rails app that allows users to track workouts.
I have built a ruby on rails app that allows for users to track
I have a pretty basic blog app on rails, and I need help creating

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.