pin method

  1. @override
Future<bool> pin(
  1. String sha256, {
  2. String by = BlossomCache.defaultHolder,
})
override

Pins the blob on behalf of by. Automatic eviction skips a blob while at least one holder pins it. Returns true if by was added, false if it already held a pin or the blob does not exist.

Implementation

@override
Future<bool> pin(String sha256, {String by = BlossomCache.defaultHolder}) =>
    _updateHolders(sha256, (holders) => holders.add(by));