in the system we need to get the newest users in two different places. Also, the number of users to get differs. But it looks like the GetLatestActivatedUsers result is cached and every second time the function is used, the wrong number of users is returned.
Do I need to clear the cache (how do I find this cache key??) or is there a better way to solve this? Any help very appreciated!
Thank you for your report. You are correct, there's an error causing the cache to incorrectly be considered valid for other values of the count parameter to GetLatestActivatedUsers. For force a cache invalidation of the value, you might call
I'd recommend, for the time being, to call the method with the greatest number of users you want to retrieve in the application, and show only the number of users you want to show. This way, there is only one UserCollection instance kept in memory for the latest activated users.