Skip to content

Commit

Permalink
Remove GenerateKey method from ICacheService.
Browse files Browse the repository at this point in the history
  • Loading branch information
Codespilot committed Mar 19, 2024
1 parent f97f7bf commit 0c6f4c6
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 28 deletions.
6 changes: 0 additions & 6 deletions Source/Euonia.Caching.Memory/MemoryCacheService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,6 @@ public async Task<TValue> AddOrUpdateAsync<TValue>(Func<Task<CacheItem<TValue>>>
return AddOrUpdate(item);
}

/// <inheritdoc />
public string GenerateKey(string separator, params object[] values)
{
return $"{_prefix}.Cache.{string.Join(separator, values)}";
}

private string RewriteKey(string key)
{
if (string.IsNullOrEmpty(_prefix))
Expand Down
1 change: 0 additions & 1 deletion Source/Euonia.Caching.Redis/RedisCacheManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public RedisCacheManager(RedisCacheOptions options)
{
var configuration = ConfigurationBuilder.BuildConfiguration(settings =>
{
//var updateMode = (CacheUpdateMode)Enum.Parse(typeof(CacheUpdateMode), options.UpdateMode);
settings.WithUpdateMode(options.UpdateMode)
.WithMaxRetries(options.MaxRetries)
.WithRetryTimeout(options.RetryTimeout)
Expand Down
6 changes: 0 additions & 6 deletions Source/Euonia.Caching.Redis/RedisCacheService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,6 @@ public async Task<TValue> AddOrUpdateAsync<TValue>(Func<Task<CacheItem<TValue>>>
return AddOrUpdate(item);
}

/// <inheritdoc />
public string GenerateKey(string separator, params object[] values)
{
return $"{_prefix}.Cache.{string.Join(separator, values)}";
}

private string RewriteKey(string key)
{
if (string.IsNullOrEmpty(_prefix))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public static ConfigurationBuilderCachePart WithRedisConfiguration(this Configur
return part;
}


/// <summary>
/// Configures a cache backplane for the cache manager.
/// The <paramref name="redisConfigurationKey"/> is used to find a matching redis configuration.
Expand Down
6 changes: 0 additions & 6 deletions Source/Euonia.Caching.Runtime/RuntimeCacheService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,6 @@ public async Task<TValue> AddOrUpdateAsync<TValue>(Func<Task<CacheItem<TValue>>>
return AddOrUpdate(item);
}

/// <inheritdoc />
public string GenerateKey(string separator, params object[] values)
{
return $"{_prefix}.Cache.{string.Join(separator, values)}";
}

private string RewriteKey(string key)
{
if (string.IsNullOrEmpty(_prefix))
Expand Down
8 changes: 0 additions & 8 deletions Source/Euonia.Caching/Abstract/ICacheService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,4 @@ public interface ICacheService
/// <typeparam name="TValue"></typeparam>
/// <returns></returns>
Task<TValue> AddOrUpdateAsync<TValue>(Func<Task<CacheItem<TValue>>> factory, CancellationToken cancellationToken = default);

/// <summary>
/// Generate cache key.
/// </summary>
/// <param name="separator"></param>
/// <param name="values"></param>
/// <returns></returns>
string GenerateKey(string separator, params object[] values);
}

0 comments on commit 0c6f4c6

Please sign in to comment.