10 [DefaultImplementation(typeof(AttachmentCacheService))]
18 Task<(
byte[]? Data,
string ContentType)>
TryGet(
string Url);
28 Task
Add(
string Url,
string ParentId,
bool Permanent,
byte[] Data,
string ContentType);
Contains a reference to an attachment assigned to a legal object.
Defines operations for caching attachment content (e.g., images) by URL.
Task< bool > Remove(string Url)
Removes the cached entry for the specified URL, if it exists.
Task Add(string Url, string ParentId, bool Permanent, byte[] Data, string ContentType)
Adds or updates an attachment in the cache.
Task MakeTemporary(string ParentId)
Marks items in the cache with the given parent ID as temporary.
Task< bool > RemoveAttachments(Attachment[]? Attachments)
Removes any attachments found in the given array from the cache.
Task MakePermanent(string ParentId)
Marks items in the cache with the given parent ID as permanent.
Task<(byte[]? Data, string ContentType)> TryGet(string Url)
Tries to retrieve cached attachment data for the specified URL.
A service that can be loaded and unloaded at will. Typically during startup and shutdown of an applic...