Fix cache injection settings

This commit is contained in:
2025-06-25 19:50:19 -06:00
parent 5697922eca
commit b9c1f794e0
3 changed files with 6 additions and 10 deletions

View File

@@ -5,22 +5,21 @@ using Core.Blueprint.Mongo;
using Core.Blueprint.Redis;
using Core.Blueprint.Redis.Helpers;
using Mapster;
using Microsoft.Extensions.Options;
namespace Core.Blueprint.DAL.Mongo.Service
{
public class MongoSampleService : IMongoSampleService
{
private readonly CollectionRepository<SampleCollection> repository;
private readonly CacheSettings cacheSettings;
private readonly ICacheSettings cacheSettings;
private readonly IRedisCacheProvider cacheProvider;
public MongoSampleService(CollectionRepository<SampleCollection> repository,
IRedisCacheProvider cacheProvider, IOptions<CacheSettings> cacheSettings)
IRedisCacheProvider cacheProvider, ICacheSettings cacheSettings)
{
this.repository = repository;
this.repository.CollectionInitialization();
this.cacheSettings = cacheSettings.Value;
this.cacheSettings = cacheSettings;
this.cacheProvider = cacheProvider;
}