CachedUserDetailsProvider

class CachedUserDetailsProvider(userDetailsProvider: UserDetailsProvider) : UserDetailsProvider

This is an utility class useful to setup a cache and re-use the details provided per user. You may invalidate the single user details, all or some. The cache provided by this class will be valid per App session. If you wish for more advanced cache types you may implement your own by implementing and customizing the interface of UserDetailsProvider.

Since

v1.5.0

Author

kristiyan

Constructors

Link copied to clipboard
fun CachedUserDetailsProvider(userDetailsProvider: UserDetailsProvider)

Functions

Link copied to clipboard
fun invalidate()

Method used to invalidate the cache

Link copied to clipboard
open override fun onUserDetailsRequested(userAliases: List<String>, completion: Completion<Iterable<UserDetails>>)

Load your user synchronously or asynchronously and return result on the OnUserDetailsListener provided interface.

Properties

Link copied to clipboard
var cachedUserDetails: HashMap<String, UserDetails>

Cached user details