Documentation modifications
This commit is contained in:
@@ -115,6 +115,16 @@ namespace adas_core.Application.Services.Caching
|
||||
// GET OR SET - STRING KEY
|
||||
// ============================================================
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves or creates an object asynchronously. When the cache mode is NONE, this method bypasses caching entirely and always invokes <paramref name="factory"/> to produce the result.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the object to retrieve or create.</typeparam>
|
||||
/// <param name="key">The cache key used to identify the cached object.</param>
|
||||
/// <param name="factory">The asynchronous factory delegate that produces the value when no cached entry exists.</param>
|
||||
/// <param name="ttl">An optional <see cref="TimeSpan"/> indicating the time-to-live for the cache entry.</param>
|
||||
/// <param name="cancellationToken">A <see cref="CancellationToken"/> to observe while waiting for the task to complete.</param>
|
||||
/// <returns>A <see cref="Task{T}"/> containing the value produced by <paramref name="factory"/>.</returns>
|
||||
/// <!-- aidoc:v1 sig=df20281 body=93d29eb -->
|
||||
public async Task<T> GetOrSetObjectAsync<T>(
|
||||
string key,
|
||||
Func<Task<T>> factory,
|
||||
@@ -145,6 +155,16 @@ namespace adas_core.Application.Services.Caching
|
||||
// GET OR SET - GroupedField + patientId
|
||||
// ============================================================
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves or creates an object asynchronously for the specified patient. This implementation does not perform caching and always invokes the supplied <paramref name="factory"/> to produce the result, corresponding to the disabled-cache (NONE) mode.
|
||||
/// </summary>
|
||||
/// <param name="groupedField">The grouped field that categorizes the object being retrieved.</param>
|
||||
/// <param name="patientId">The identifier of the patient to whom the object belongs.</param>
|
||||
/// <param name="factory">The asynchronous factory delegate invoked to produce the object.</param>
|
||||
/// <param name="ttl">An optional time-to-live for the cached entry. Ignored because caching is disabled.</param>
|
||||
/// <param name="cancellationToken">The token used to observe cancellation of the factory invocation.</param>
|
||||
/// <returns>A task that yields the object produced by <paramref name="factory"/>.</returns>
|
||||
/// <!-- aidoc:v1 sig=f122a12 body=93d29eb -->
|
||||
public async Task<T> GetOrSetObjectAsync<T>(
|
||||
GroupedField groupedField,
|
||||
ObjectId patientId,
|
||||
|
||||
Reference in New Issue
Block a user