Files seem to be caching on deployed app service

Deej 21 Reputation points
2024-10-03T20:19:59.7333333+00:00

Files appear to be caching when I deploy my app through DevOps. The App Service seems to have deployed just fine but when I update and redeploy my changes don't seem to have been applied.

Pages I changed still show the old version, deleted pages still appear, and pages I have added give me 404. I am deploying through a YAML script, when I push to Azure GIT, it kicks of a pipeline. The pipeline shows no errors.

Is there something special I should be adding to my script to allow this?

Running my app is Visual Studio 2022 all is fine I can see my changes and test them no problem.

I haven't seen this behaviour before, has anyone any clues please?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,902 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 26,636 Reputation points Microsoft Employee
    2024-10-18T18:39:40.1333333+00:00

    Deej, Adding to Lex Li response. Could you please provide details about you app framework?

    Based on my understanding of your issue description, you are experiencing an issue where your Azure App Service is serving old files despite deploying new changes.

    Set WEBSITE_RUN_FROM_PACKAGE environmental variable --the app setting is set, this command doesn't extract the package content to the D:\home\site\wwwroot directory of your app. Instead, it uploads the ZIP file as-is to D:\home\data\SitePackages, and creates a packagename.txt in the same directory, that contains the name of the ZIP package to load at runtime. See this doc for more info: deploy-run-package#run-the-package

    Additionally, just to isolate, if your app settings include caching options, consider disabling them

    • WEBSITE_DYNAMIC_CACHE = 0
    • WEBSITE_LOCAL_CACHE_OPTION = Never

    To fetch more info, you may check the deployment logs in Azure DevOps and App Service logs to: #enable-application-logging-linuxcontainer

    Kindly let us know, we will follow-up with you further.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.