We have deployed our application in azure (isolated environment, once instance), but since last few days caching isnt working as expected. We are using default in memory cache. Below are two of the critical scenarios that are failing -
We allow user to upgrade to a plan from tenant login, so after upgrading we are reloading the application. All the tenant details along with the new edition are retrived properly but the newly added permissions are not returned and because of that user cannot access the new features. It was all working fine till last week. Not sure if it is because of the azure app service plan? There were no code changes done related to it. It all works fine on localhost.
Impersonation is failing - error thrown is "Impersonation token is invalid or expired!", so here token is generated but it fails to retrieve it from cache.
Export users to excel is also failing..since its fail to fetch the file token from TempFileCacheManager.
So overall caching is not working as expected. Can you help us to resolve this issue? Also can implementing redis cache will help us to resolve this?
Thanks.
4 Answer(s)
-
0
Hi, if the code has been change since it was in the working state, it is probably cause by the application configuration/enviroment.
in memory cache only works if your application only run as a single web server.
If the application is configured to scale with more than one web server, you can switch to redis cache and use the same redis store for multiple web servers
-
0
Right now its single web server. Are you aware of any such configuration or setting in environment that could affects this?
-
0
Are you able to get config changes on your Azure setup ?
-
0
Issue has been resolved.