Answer the question
In order to leave comments, you need to log in
How to reset the browser cache when changing user rights?
Good afternoon.
I'm loading a list of cities in a certain region for a specific user.
Let's say there are 100 cities in the list, but this particular user has access to 10 cities in the region.
The region has idhash. Accordingly, the list is stored in the browser cache.
Accordingly, when loading the list, I check this hash, if it has not changed, then I take it from the browser cache.
But there may be such a case that the user's rights have changed and he has access to the entire list of cities, while the information will not change due to the saved idhash.
How are such problems solved?
Answer the question
In order to leave comments, you need to log in
Cache invalidation. A problem that accompanies any data caching. It is necessary to implement one or another synchronization method, which depends on why you need a cache and what you are willing to sacrifice. Or discard the cache. In any case, it must be understood that any synchronization is time, i.e. for some time, in any case, the data will not be "correct".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question