Azure-docs: What are the available values for WEBSITE_LOCAL_CACHE_OPTION to set

Created on 11 Mar 2020  Â·  6Comments  Â·  Source: MicrosoftDocs/azure-docs

"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


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri3 app-servicsvc cxp product-question triaged

All 6 comments

@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?

@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.
image

@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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bityob picture bityob  Â·  3Comments

jharbieh picture jharbieh  Â·  3Comments

jamesgallagher-ie picture jamesgallagher-ie  Â·  3Comments

Agazoth picture Agazoth  Â·  3Comments

bdcoder2 picture bdcoder2  Â·  3Comments