removeUser method

Result<CacheEntry<K, V, U>, CachetteError> removeUser(
  1. K key,
  2. U user, {
  3. bool removeIfUnused = true,
  4. bool callOnEvict = true,
})

Removes a single user from thee cache item with key. If removeIfUnused and the item has no users after removing user, it will be removed from the cache.

Implementation

Result<CacheEntry<K, V, U>, CachetteError> removeUser(
  K key,
  U user, {
  bool removeIfUnused = true,
  bool callOnEvict = true,
}) =>
    removeUsers(
      key,
      {user},
      removeIfUnused: removeIfUnused,
      callOnEvict: callOnEvict,
    );