Replies: 1 comment
-
You certainly shouldn't need to restart IIS, especially since the Navigation items should be cached on the basis of user, not overall, if I understand what you are asking correctly (login). There might be a difference between what the user should see at one point and what he/she should see later, based on an administrator's changes to the user's privileges, right? There are a lot of Cache methods useful for expiring or invalidating items in the cache. Typically, how you use them or when you call them depends on how you are dynamically changing what should appear in the cache. For example, you are dynamically changing or adding to Navigation Items, is this for everybody or just for one user? If just one user, the answer might be to call something like this at the point where you make the change:
The difficulty remains exactly when to do this so that the existing menu for the logged-in user refreshes. You will find that there is a RemoveCachedUser method in UserRetrieveService, and it is called in UserPasswordValidator.cs. It sounds as though you may want to call this method (and possibly add some code to it) in AccouintPage.cs, during login. There could be a lot of other places to do this. So, if I have misunderstood the scenario, please explain. PS, here from the wiki is an example of calling for a change to the cache externally; this might be good for you, depending on the conditions that require the un-caching: https://github.com/serenity-is/Serenity/wiki/Server-Side-Cache-Invalidate-Lookup-Script |
Beta Was this translation helpful? Give feedback.
-
when I added a Navigation Item at run time the system not affected , we should restart the IIS to see our modification
how to prevent cashing the NavigationItem, I want to refresh the navigation items after login to the system.
public List GetItems()
Beta Was this translation helpful? Give feedback.
All reactions