Chris Reddick
 New Member Posts:2

 |
09/29/2023 8:27 PM |
|
I'm using [entry:Canapprove] in my template to show a message if they have approval permission on a file. When I move a user into a role that gives them this permission (returned value changes from false to true) it does not update until I restart the application, or Increment the host version in the Server Settings > Performance tab. This wouldn't be a problem except moving users in and out of roles is a daily occurrence and manually restarting the application or incrementing the host version every time would be a pretty significant burden. Any ideas? Thanks! DMX Version 6.49 DNN Version 9.11.0 |
|
|
|
|
Chris Reddick
 New Member Posts:2

 |
10/03/2023 10:29 PM |
|
It's not optimal, but for the moment I've dropped a custom module on my template page that clears the cache when someone loads the page: DataCache.ClearCache(); I had hoped to fine a prefix e.g. DataCache.ClearCache("DNN_DMX") to narrow the cache clear and reduce the impact on performance but have not yet had any luck. |
|
|
|
|
Peter Donker
 Veteran Member Posts:4536

 |
10/09/2023 12:39 PM |
|
Indeed a user's status/permissions are heavily cached for performance reasons. The complexity here is that the changes are done at DNN level but I need to cache something in my module. I haven't found a way to detect changes at the framework level so as to invalidate the cache at the module level. |
|
|
|
|