Skip to content

Commit

Permalink
fix: Redis Options not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
wzh425 committed Sep 13, 2024
1 parent 82f96f1 commit 66be8a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

public static class ServiceCollectionExtensions
{
public static IServiceCollection AddCache(this IServiceCollection services)
public static IServiceCollection AddCache(this IServiceCollection services, RedisConfigurationOptions redisOptions)
{
services.AddMultilevelCache(options => options.UseStackExchangeRedisCache());
services.AddMultilevelCache(options => options.UseStackExchangeRedisCache(redisOptions));
services.AddScoped<ICacheContext, CacheContext>();
return services;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Masa.Mc.Service/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@
Password = masaStackConfig.RedisModel.RedisPassword
};
var configuration = builder.Services.GetMasaConfiguration().ConfigurationApi.GetDefault();
builder.Services.AddCache(redisOptions);
builder.Services.AddScoped<ITokenGenerater, TokenGenerater>();
builder.Services.AddCache();
builder.Services.AddAuthClient(masaStackConfig.GetAuthServiceDomain(), redisOptions);
builder.Services.AddMcClient(masaStackConfig.GetMcServiceDomain());
builder.Services.AddPmClient(masaStackConfig.GetPmServiceDomain());
Expand Down

0 comments on commit 66be8a7

Please sign in to comment.