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

  • Home
  • SEARCH
  • 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 8230431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:08:01+00:00 2026-06-07T17:08:01+00:00

The question: Are sf2 caches directory-independent? Ie: Can I do cache:clear in a certain

  • 0

The question:

Are sf2 caches directory-independent? Ie: Can I do cache:clear in a certain dir and then move the project dir to another machine/directory without breaking the caches?

The scenario:

  • We have an application based on Symfony2.
  • The production machine has 500MB.
  • We currently deploy by uploading the soft and then clearing the caches.
  • In the production machine, app/console cache:clear lasts about 5 mins to be generated.
  • In a devel-machine with 2GB it lasts just a few seconds.

We have a requirement to minimize time-to-production. 5 mins waiting the caches is too much.

We thought about running the cache:clear in a local machine and then upload the product to production with the caches already generated. The local paths of the project (/home/ubuntu/devel/…) are different to the production paths (/var/www) and cannot be tuned to be the same.

  • 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-06-07T17:08:02+00:00Added an answer on June 7, 2026 at 5:08 pm

    Symfony2 cache uses absolute paths in various places, so you can’t copy the cache from one machine to the other, if the paths differ.

    What you are really looking for is deployment via capifony. Upon deployment it creates a new folder on your live machine, prepares the new version of your project in that folder (includes publishing assets, clearing the cache and so on) and then simply switches the old folder with the new folder.

    As a certain number of old versions is kept on the live server, you can even do a rollback if you have to.

    And you can build a nifty one click deployment with capifony and Jenkins CI 😉

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

Sidebar

Related Questions

Question: Can I override default functions in Javascript? Background: After figuring out that I
Couple of month ago I got a legacy project written on Sf2. I fixed
Question: How can I give a new user almost all privileges, but still keep
Question Is it possible to create a second Preference Dialog that can take some
Question How can I remove empty xml tags in PHP? Example: $value1 = 2;
Question Summary: how can I get the path to the currently active application under
Question is in the title. I can access $_COOKIE['blah'] in my php file in
Question: Normally, you can undo a sql command with rollback. BEGIN TRY BEGIN TRANSACTION
Question Can I build a image database/library that has an e-commerce style checkout system
Question Using XSLT 1.0, given a string with arbitrary characters how can I get

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.