def delete_by_pattern(pattern, count: DEFAULT_COUNT)
      result, elapsed = timed do
        digests = all(pattern: pattern, count: count)
        batch_delete(digests)
        digests.size
      end

      log_info("#{__method__}(#{pattern}, count: #{count}) completed in #{elapsed}ms")

      result
    end
def delete_by_pattern(pattern, count: DEFAULT_COUNT)
      result, elapsed = timed do
        digests = all(pattern: pattern, count: count)
        batch_delete(digests)
        digests.size
      end

      log_info("#{__method__}(#{pattern}, count: #{count}) completed in #{elapsed}ms")

      result
    end
Deletes unique digests by pattern

 @param [String] pattern a key pattern to match with
 @param [Integer] count the maximum number
 @return [Array<String>] with unique digests