Interface IInMemoryTemporaryFileCache
Provides an in memory temporary file cache.
public interface IInMemoryTemporaryFileCache
Methods
GetAll()
Gets all entries in the cache.
IQueryable<InMemoryTemporaryFileCacheEntry> GetAll()
Returns
- IQueryable<InMemoryTemporaryFileCacheEntry>
The entries.
TryAdd(BinaryFile, string?)
Tries to add a file in the storage.
Guid TryAdd(BinaryFile file, string? userId)
Parameters
file
BinaryFileThe file.
userId
stringThe user id.
Returns
- Guid
The file identifier if the file was added, null otherwise.
TryGet(Guid, out BinaryFile?)
Tries to get a file from the storage.
bool TryGet(Guid guid, out BinaryFile? file)
Parameters
guid
GuidThe file identifier.
file
BinaryFileThe found file or null.
Returns
- bool
True if the file was found, false otherwise.
TryRemove(Guid)
Tries to remove a file from the storage.
bool TryRemove(Guid guid)
Parameters
guid
GuidThe file identifier.
Returns
- bool
True if the file was removed, false otherwise.