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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:43:45+00:00 2026-05-15T12:43:45+00:00

Sometime I will implement changes locally and they work fine, I copy them to

  • 0

Sometime I will implement changes locally and they work fine, I copy them to my remote webserver and the changed are ignored. (The code is identical.)

I go into core.php, change debugging to 3, check again… it works!

I have a feeling it’s something to do with cache but I don’t know what exactly to change.

  • 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-15T12:43:46+00:00Added an answer on May 15, 2026 at 12:43 pm

    CakePHP has a cache located in /app/tmp/cache. The directory structure looks like this:

    # /app/tmp/cache
    # /app/tmp/cache/models
    # /app/tmp/cache/persistent
    # /app/tmp/cache/views
    

    The main issue usually experienced is with the model cache. When debug is off (ie. in production) and you cause CakePHP to dispatch, it introspects the schema of all your database tables and stores these in flat files in the models folder above. If you do not delete the files in this folder, CakePHP will start to say models/tables/fields don’t exist when they clearly do in your database.

    If you enable view caching in your application, when views are rendered for the first time CakePHP will compile flat files to the views folder to prevent having to render these views again on the next request.

    During CakePHP’s bootstrap process it has to determine the directory structure you are using in your installation before it can access important files (like database.php). As such, CakePHP will generate cache files to the persistent directory with the absolute paths to each and every important directory and file, any plugins you are using and even any localisations you have created so it can quickly translate your application between languages without reparsing .pot files.

    So, simply put, you have to remember to delete all of the files in these directories whenever you make code changes to an application that is in production, or add this as part of your deployment mechanism. You must not delete any of the directories however.

    The reason changing debug to 3 works for you is because when debug mode is turned on (at any value greater zero) the cache is cleared and regenerated on every request, but – while this works – it is not easy to automate.

    There are a number of ways to do this programmatically – including shell commands, CakePHP plugins, Capistrano configs, Ant files – but one can also just do so manually.

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

Sidebar

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.