=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===
This commit is contained in:
@@ -9,6 +9,7 @@ namespace adas_core.Application.Services.Caching
|
||||
/// No almacena nada, no devuelve nada y no interfiere con el flujo.
|
||||
/// Se usa cuando el CacheMode es "None".
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=2b881c5 -->
|
||||
public class NoCacheService : ICacheService
|
||||
{
|
||||
/// <summary>
|
||||
@@ -16,6 +17,7 @@ namespace adas_core.Application.Services.Caching
|
||||
/// </summary>
|
||||
/// <param name="key">The identifier used to reference the value.</param>
|
||||
/// <param name="value">The value intended to be associated with the key.</param>
|
||||
/// <!-- aidoc:v1 sig=c91035b body=4448e1d -->
|
||||
public void SetValue(string key, string value)
|
||||
{
|
||||
// No hacer nada
|
||||
@@ -27,6 +29,8 @@ namespace adas_core.Application.Services.Caching
|
||||
/// </summary>
|
||||
/// <param name="key">The key used to look up the associated value.</param>
|
||||
/// <returns>The value associated with <paramref name="key"/>, or <c>null</c> if no value is found.</returns>
|
||||
/// <!-- aidoc-review:v1 severity=high kind=wrong_summary
|
||||
/// "The summary states the method 'retrieves' a value for the specified key, but the body unconditionally returns null and performs no retrieval/lookup logic. The <returns> tag also implies a non-null value path that the code cannot produce." -->
|
||||
public string? GetValue(string key)
|
||||
{
|
||||
return null;
|
||||
@@ -38,6 +42,7 @@ namespace adas_core.Application.Services.Caching
|
||||
/// <param name="key">The identifier of the object to retrieve.</param>
|
||||
/// <param name="updateExpiration">Indicates whether the expiration of the entry should be updated upon retrieval.</param>
|
||||
/// <returns>A <see cref="Task{T}"/> that represents the asynchronous retrieval, containing the object associated with the key or the default value of <typeparamref name="T"/> if not found.</returns>
|
||||
/// <!-- aidoc:v1 sig=5046896 body=772039d -->
|
||||
public Task<T?> GetObjectAsync<T>(string key, bool updateExpiration = true)
|
||||
{
|
||||
return Task.FromResult<T?>(default);
|
||||
@@ -50,6 +55,7 @@ namespace adas_core.Application.Services.Caching
|
||||
/// <param name="key">The unique identifier used to store and later retrieve the object.</param>
|
||||
/// <param name="obj">The object to store in the data store.</param>
|
||||
/// <param name="updateExpiration">Indicates whether the expiration time of the cached entry should be updated. Defaults to true.</param>
|
||||
/// <!-- aidoc:v1 sig=255c42a body=6805ef5 -->
|
||||
public Task SetObjectAsync<T>(string key, T obj, bool updateExpiration = true)
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
@@ -63,6 +69,7 @@ namespace adas_core.Application.Services.Caching
|
||||
/// <param name="ttlOverride">An optional time-to-live value that, when provided, overrides the default expiration for the entry.</param>
|
||||
/// <param name="updateExpiration">Indicates whether the expiration of the entry should be refreshed upon a successful retrieval.</param>
|
||||
/// <returns>A <see cref="Task{T}"/> that represents the asynchronous operation, containing the retrieved object or <c>null</c> if no value is found.</returns>
|
||||
/// <!-- aidoc:v1 sig=efdd78f body=772039d -->
|
||||
public Task<T?> GetObjectAsync<T>(string key, TimeSpan? ttlOverride, bool updateExpiration)
|
||||
{
|
||||
return Task.FromResult<T?>(default);
|
||||
@@ -76,6 +83,7 @@ namespace adas_core.Application.Services.Caching
|
||||
/// <param name="ttlOverride">An optional time-to-live value that overrides the default expiration period; <c>null</c> uses the default.</param>
|
||||
/// <param name="updateExpiration">A value indicating whether the expiration time should be updated.</param>
|
||||
/// <returns>A task that represents the asynchronous set operation.</returns>
|
||||
/// <!-- aidoc:v1 sig=25d628c body=6805ef5 -->
|
||||
public Task SetObjectAsync<T>(string key, T obj, TimeSpan? ttlOverride, bool updateExpiration)
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
@@ -87,6 +95,7 @@ namespace adas_core.Application.Services.Caching
|
||||
/// </summary>
|
||||
/// <param name="pattern">The pattern used to identify the items to delete.</param>
|
||||
/// <returns>A <see cref="Task{Int64}"/> representing the asynchronous operation, with a result of 0 indicating that no items were deleted.</returns>
|
||||
/// <!-- aidoc:v1 sig=a8cca2e body=14896de -->
|
||||
public Task<long> DeleteByPatternAsync(string pattern)
|
||||
{
|
||||
return Task.FromResult(0L);
|
||||
@@ -98,6 +107,7 @@ namespace adas_core.Application.Services.Caching
|
||||
/// </summary>
|
||||
/// <param name="key">The identifier of the object to delete.</param>
|
||||
/// <returns>A <see cref="Task"/> that represents the asynchronous delete operation.</returns>
|
||||
/// <!-- aidoc:v1 sig=93555f0 body=6805ef5 -->
|
||||
public Task DeleteObjectAsync(string key)
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
@@ -106,6 +116,7 @@ namespace adas_core.Application.Services.Caching
|
||||
/// <summary>
|
||||
/// Performs a cleanup operation on the cache. Currently, this method has no implementation and does not perform any cleanup actions.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=d5e5e8c body=4448e1d -->
|
||||
public void CleanCache()
|
||||
{
|
||||
// Nada que limpiar
|
||||
@@ -142,6 +153,7 @@ namespace adas_core.Application.Services.Caching
|
||||
/// <param name="loader">The asynchronous function used to load the value.</param>
|
||||
/// <param name="ttl">An optional time-to-live duration for the value.</param>
|
||||
/// <returns>A task that represents the asynchronous operation, containing the loaded value as a nullable string.</returns>
|
||||
/// <!-- aidoc:v1 sig=02351fc body=f2ab08b -->
|
||||
public async Task<string?> GetOrSetValueAsync(
|
||||
string key,
|
||||
Func<Task<string>> loader,
|
||||
|
||||
Reference in New Issue
Block a user