Fix gets services for mongo and sql samples

This commit is contained in:
Sergio Matias 2025-06-25 17:55:32 -06:00
parent 0670de0abe
commit b317bfc425
2 changed files with 4 additions and 4 deletions

View File

@ -43,7 +43,7 @@ namespace Core.Blueprint.DAL.Mongo.Service
var sample = await this.repository.FindByIdAsync(_id);
await cacheProvider.SetAsync(cacheKey, sample);
await cacheProvider.SetAsync(cacheKey, sample, TimeSpan.FromMinutes(cacheSettings.DefaultCacheDurationInMinutes));
return sample;
}
@ -58,7 +58,7 @@ namespace Core.Blueprint.DAL.Mongo.Service
var samples = await this.repository.AsQueryable();
await cacheProvider.SetAsync(cacheKey, samples);
await cacheProvider.SetAsync(cacheKey, samples, TimeSpan.FromMinutes(cacheSettings.DefaultCacheDurationInMinutes));
return samples;
}

View File

@ -30,7 +30,7 @@ public class SqlSampleService : ISqlSampleService
var samples = await _sqlSampleRepository.GetAllAsync();
await cacheProvider.SetAsync(cacheKey, samples);
await cacheProvider.SetAsync(cacheKey, samples, TimeSpan.FromMinutes(cacheSettings.DefaultCacheDurationInMinutes));
return samples;
}
@ -44,7 +44,7 @@ public class SqlSampleService : ISqlSampleService
var sample = await _sqlSampleRepository.GetByIdAsync(id);
await cacheProvider.SetAsync(cacheKey, sample);
await cacheProvider.SetAsync(cacheKey, sample, TimeSpan.FromMinutes(cacheSettings.DefaultCacheDurationInMinutes));
return sample;
}