Base solution for your next web application
Open Closed

In memory cache not working in azure web service, which is failing to fetch users recent permissions and retrieving impersonation token from cache #7821


User avatar
0
[email protected] created

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 -

  1. 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.

  2. 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.

  3. 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)
  • User Avatar
    0
    ryancyq created
    Support Team

    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

  • User Avatar
    0
    [email protected] created

    Right now its single web server. Are you aware of any such configuration or setting in environment that could affects this?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @[email protected]

    Are you able to get config changes on your Azure setup ?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Issue has been resolved.