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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:12:59+00:00 2026-05-26T16:12:59+00:00

I am constantly developing my rails app and deploying about once every 1 or

  • 0

I am constantly developing my rails app and deploying about once every 1 or 2 weeks. I have a lot of content that I would like to be cached for quite awhile. I switched to using rails file_store for caching since the other caching options store the cache in memory which goes away when I have to restart passenger. The problem I am having is that every time I deploy an update, I loose my cache anyway even though it is file based. Is there a way to prevent the cache from clearing when you deploy an update for a rails app? I am using capistrano for deployment and git for version control.

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

    Make a directory under the shared directory to hold the cache. In your deploy.rb, make a symlink to the new directory where the old cache directory used to be. For example, here is a simplified version of how I symlink the log directory:

    namespace :deploy do
      desc "Re-link log files"
      task :link_logs, :roles => :app do
        run "ln -nfs '#{shared_path}/log' '#{current_path}/log'"
      end
    end
    
    # Activate post-deploy re-linking
    after 'deploy:symlink', 'deploy:link_logs'
    

    Now, whenever I deploy, my logs are continuous across deploys and stored in:
    */path/to/deploy_dir/shared/log*

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

Sidebar

Related Questions

My coworker and I constantly argue about button sizes. I like to have buttons
I am developing a site that I would like to check for validity with
We have been developing a DB web app which constantly queries an SQL store
I am constantly noticing that I have files checked out for editing that I
I am developing a project that lately have been taking off with increased popularity.
I am developing an app that at startup sets up a database cursor to
I'm developing a system (with Rails 2.3.2, Ruby 1.8.7-p72) that has a sizable reporting
I've been developing Ruby on Rails applications for some time, and have often found
I am developing a win form app and I found myself constantly requiring to
I am developing an iPhone app that uses a web based API that I

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.