i have a problem when i update permissions for specific user or role the permissions cache does not refresh i want a solution to refresh cache without restarting project. :) my project contains main application and group of modules.
4 Answer(s)
-
0
Hi
please check https://github.com/abpframework/abp/issues/1678 and https://stackoverflow.com/questions/49769936/refresh-permissions-from-in-memory-cache-with-asp-net-boilerplate check if found helpful for you.
Regards, Anjali
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
i try to use ICacheManager but does not contain this function => GetUserPermissionCache and i put
Configure(options => { options.GlobalCacheEntryOptions = new DistributedCacheEntryOptions() { AbsoluteExpiration = DateTimeOffset.UtcNow.Addseconds(60)//60 second };
});it's work but the project has become very slow can you help me :(
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hello hayash,
The project is slow because you are configuring the permissions cache to expire every 60 seconds. This means that the permissions cache will be refreshed every 60 seconds, which can be a lot of work for the server.
To speed up the project try to Increase the time between cache refreshes. For example, you could configure the permissions cache to expire every 300 seconds instead of 60 seconds.
Regards,
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)