-
Notifications
You must be signed in to change notification settings - Fork 18
Users cache size limit #86
Description
The usersCache currently does not have a size limit. I've read that NSCache purges entries when a device is running low on memory, but I'm not sure I understand how that translates to a server context (there may be memory available, but we don't necessarily want to use it). I'm also not sure whether that functionality exists in the open-source Foundation used on Linux.
Perhaps Credentials.register should accept an optional cacheLimit argument that sets the NSCache.countLimit for the plugin being registered. As Credentials itself creates the cache, there's no change required for the plugins themselves.
This applies to the 'original' Credentials plugins; the type-safe credentials implementations already provide their own way to set the countLimit for the token cache.