"properties": {
"WEBSITE_LOCAL_CACHE_OPTION": "Always",
"WEBSITE_LOCAL_CACHE_SIZEINMB": "300"
}
I want to set the value for WEBSITE_LOCAL_CACHE_OPTION via parameter which will differ from environment to environment. For example, I don't want to use local cache for test environments, then what should be the value?
Edited: Added GitHub footer
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@SamratAlamgir, Thanks for leveraging Azure docs feedback channel to raise the question!
This channel is reserved for ‘Azure docs’ feedback- document feedback & content improvements. Could you please share the Azure doc for which this feedback is applicable to?
This is for Azure App Service Local Cache.
https://docs.microsoft.com/en-us/azure/app-service/overview-local-cache
@SamratAlamgir, Yes. You typically don't set the staging slot to use Local Cache to enable a seamless build-deploy-test lifecycle. (These are defined aliases) WEBSITE_LOCAL_CACHE_OPTION & WEBSITE_LOCAL_CACHE_SIZEINMB - you can set these app settings to stick to production slot only.

@AjayKumar-MSFT, Thanks for your response. Actually I was asking for the other values for WEBSITE_LOCAL_CACHE_OPTION. I mean is there any value like "Never" which we can set when I want to disable (or don't want to use) local cache options for an environment. In my case, I want to use the same ARM template for different environments like Dev, QA, and Production. I have different parameter files that differs based on different environments.
Common ARM template
"properties": {
"WEBSITE_LOCAL_CACHE_OPTION": "[parameters('LocalCacheOption')]",
"WEBSITE_LOCAL_CACHE_SIZEINMB": "300"
}
Production Parameters File:
"parameters": {
"LocalCacheOption": {
"value": "Always"
}
...
}
Dev Parameter File (where I don't to use local case):
```
"parameters": {
"LocalCacheOption": {
"value": "
}
...
}
I have tested and it seems that set the value to empty is the probable solution if we don't want to enable local cache for a site.
You can try WEBSITE_LOCAL_CACHE_OPTION = Never for the staging slot. You can also refer the Best practices for using App Service Local Cache for additional details on local cache feature with the slots.
We will close this out, but if you feel you need more information please just let us know.
Thanks again for the follow-up and raising this good feedback!