-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathIFileCache.cs
More file actions
23 lines (18 loc) · 958 Bytes
/
IFileCache.cs
File metadata and controls
23 lines (18 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System.Threading;
using System.Threading.Tasks;
namespace GroupDocs.Viewer.UI.Core
{
public interface IFileCache
{
TEntry TryGetValue<TEntry>(string cacheKey, string filePath);
Task<TEntry> TryGetValueAsync<TEntry>(string cacheKey, string filePath, CancellationToken cancellationToken = default);
void Set<TEntry>(string cacheKey, string filePath, TEntry entry);
Task SetAsync<TEntry>(string cacheKey, string filePath, TEntry entry, CancellationToken cancellationToken = default);
/// <summary>
/// Removes all cache entries associated with the specified file path.
/// </summary>
/// <param name="filePath">The file path whose cache entries should be removed.</param>
/// <param name="cancellationToken">A token to cancel the operation.</param>
Task RemoveAsync(string filePath, CancellationToken cancellationToken = default);
}
}