Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Backend/Remora.Discord.Caching/Services/CacheService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,11 @@ public ValueTask<Result<TInstance>> TryGetValueAsync<TInstance>(CacheKey key, Ca
/// Attempts to retrieve the previous value of the given key from the eviction cache.
/// </summary>
/// <param name="key">The cache key.</param>
/// <param name="ct">A cancellation token to cancel the operation.</param>
/// <typeparam name="TInstance">The instance type.</typeparam>
/// <returns>A <see cref="Result"/> that may or not have succeeded.</returns>
public ValueTask<Result<TInstance>> TryGetPreviousValueAsync<TInstance>(CacheKey key)
where TInstance : class => _cacheProvider.RetrieveAsync<TInstance>(new KeyHelpers.EvictionCacheKey(key));
public ValueTask<Result<TInstance>> TryGetPreviousValueAsync<TInstance>(CacheKey key, CancellationToken ct = default)
Comment thread
Nihlus marked this conversation as resolved.
where TInstance : class => _cacheProvider.RetrieveAsync<TInstance>(new KeyHelpers.EvictionCacheKey(key), ct);

/// <summary>
/// Evicts the instance with the given key from the cache.
Expand Down
Loading