1

Im working on symfony project i got strange problem in production envirment. when i load the page it always getting to cache any dynamic data are not loading to the page. when i clear the cache browser its getting fixed data display correctly

my configuration in symfony config files cache false my application currently hosted in cloud envirment

My symfony config file cache.yml settings here

  default:
      enabled:     off
      with_layout: false
      lifetime:    86400
0

2 Answers 2

1

From the Symfony guide

Global Cache Settings

For each application of a project, the HTML cache mechanism can be enabled or disabled (the default), per environment, in the cache setting of the settings.yml file. Listing 12-1 demonstrates enabling the cache.

Listing 12-1 - Activating the Cache, in frontend/config/settings.yml

prod:
  .settings:
    cache:                  off
Sign up to request clarification or add additional context in comments.

1 Comment

no luck then my application redirected to login page every time
0

simple Solution is

header("Cache-Control: no-store, no-cache, must-revalidate"); 

put it your symfony web/index.php top

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.