Skip to content

Commit

Permalink
app项目模板CacheKeys缓存键增加获取模块缓存键方法
Browse files Browse the repository at this point in the history
  • Loading branch information
zhontai committed Feb 23, 2025
1 parent c1e2f3b commit 794a749
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions templates/app/content/MyApp.Api/Core/Consts/CacheKeys.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,11 @@ public static partial class CacheKeys
/// </summary>
[Description("模块缓存键")]
public const string ModuleActionKey = "module:action:";

/// <summary>
/// 获取模块缓存键
/// </summary>
/// <param name="id">模块Id</param>
/// <returns></returns>
public static string GetModuleActionKey(long id) => $"{ModuleActionKey}{id}";
}

0 comments on commit 794a749

Please sign in to comment.