Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
IInternetCacheService.cs
1using System;
2using System.Threading;
3using System.Threading.Tasks;
5
7{
8
12 [DefaultImplementation(typeof(InternetCacheService))]
14 {
20 Task<(byte[]? Data, string ContentType)> TryGet(Uri Uri);
21
29 Task<(byte[]? Data, string ContentType)> GetOrFetch(Uri Uri, string ParentId, bool Permanent);
30
39 Task<(byte[]? Data, string ContentType)> GetOrFetch(Uri Uri, string ParentId, bool Permanent, TimeSpan Timeout);
40
46 Task<bool> Remove(Uri Uri);
47
52 Task MakeTemporary(string ParentId);
53
58 Task MakePermanent(string ParentId);
59
65 Task<int> RemoveByParentId(string ParentId);
66 }
67}
Defines operations for caching arbitrary internet-fetchable content.
Task MakeTemporary(string ParentId)
Marks items in the cache with the given parent ID as temporary.
Task<(byte[]? Data, string ContentType)> GetOrFetch(Uri Uri, string ParentId, bool Permanent)
Retrieves content for the specified URI from cache or fetches and caches it if missing.
Task<(byte[]? Data, string ContentType)> TryGet(Uri Uri)
Tries to retrieve a cached blob for the specified URI.
Task< bool > Remove(Uri Uri)
Removes the cached entry for the specified URI, if it exists.
Task MakePermanent(string ParentId)
Marks items in the cache with the given parent ID as permanent.
Task< int > RemoveByParentId(string ParentId)
Removes all cached entries having the specified parent ID.
Task<(byte[]? Data, string ContentType)> GetOrFetch(Uri Uri, string ParentId, bool Permanent, TimeSpan Timeout)
Retrieves content for the specified URI from cache or fetches and caches it if missing,...
A service that can be loaded and unloaded at will. Typically during startup and shutdown of an applic...