Skip to content

Commit

Permalink
Merge pull request #67 from EasyAbp/register-cache-implementation
Browse files Browse the repository at this point in the history
Register `SharedStackExchangeRedisAccessTokenCache`
  • Loading branch information
gdlcf88 authored Dec 27, 2022
2 parents 5e766dd + 2c2423f commit a5fb6da
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>2.0.0-rc.22</Version>
<Version>2.0.0-rc.23</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>EasyAbp Team</Authors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Caching.StackExchangeRedis;
using Volo.Abp.Caching.StackExchangeRedis;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Settings;

namespace EasyAbp.Abp.WeChat.Common.SharedCache.StackExchangeRedis.Infrastructure.AccessToken;

public class SharedStackExchangeRedisAccessTokenCache : IAccessTokenCache
public class SharedStackExchangeRedisAccessTokenCache : IAccessTokenCache, ITransientDependency
{
public static string CachePrefix { get; set; } = "WeChatTokens:";
public static string SettingName { get; set; } = SharedCacheStackExchangeRedisSettings.RedisConfiguration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

namespace EasyAbp.Abp.WeChat.Common.Infrastructure.AccessToken;

[Dependency(TryRegister = true)]
public class DefaultAccessTokenCache : IAccessTokenCache, ITransientDependency
{
protected IDistributedCache<string> DistributedCache { get; }
Expand Down

0 comments on commit a5fb6da

Please sign in to comment.