How to keep cache isolated between different users ?
See original GitHub issueLet us consider the following method
@Cacheable()
getOrders() {
return this.http
.get(`${environment.api}/orders`);
}
If I switch users in the same machine in the same window (like logout and login). I see that the cache from the previous user is used for the currently logged-in user. which yields me totally wrong set of values.
I also tried to set the globalCacheKey
to be a unique id to isolate the cache between multiple users. But it doesn’t work.
Thanks in advance.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
FairRide: Near-Optimal, Fair Cache Sharing | the morning paper
Isolation – each user should receive no less cache space than they would if the cache were statically and equally divided between all...
Read more >Caching guidance - Azure Architecture Center | Microsoft Learn
Learn how caching can improve the performance and scalability of a system by copying frequently accessed data to fast storage close to the...
Read more >FairRide: Near-Optimal, Fair Cache Sharing - People @EECS
performance isolation for multiple users/applications and high utilization for the systems. We study the problem of fair allocation of memory cache for ...
Read more >Improve security and privacy by updating HTTP Cache
There are often multiple layers of cache. Some caches are dedicated to a single user, some to multiple users. Some are controlled by...
Read more >9 Understanding Caching - Oracle Help Center
EclipseLink uses two types of cache: the shared persistence unit cache (L2) maintains objects retrieved from and written to the data source; and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @fasidOnGit, I think this should be left to user land since we cant make any assumptions on when and how to clear the cache. The global cache key is just for the purposes of name-spacing your cache storage.
Alright, thanks for the explanation.