fix:解决标的债券期限缓存不一致的问题
This commit is contained in:
@@ -194,6 +194,27 @@ namespace YLErp.Modules.UnderlyingModule
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 清除指定标的的保证金率缓存
|
||||
/// </summary>
|
||||
/// <param name="underlyingCode">标的代码,为空时清除全部</param>
|
||||
public static void ClearMarginRateCache(string underlyingCode = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (ylCache == null) return;
|
||||
|
||||
var cachePattern = string.IsNullOrEmpty(underlyingCode)
|
||||
? "ClientMarginRate:*"
|
||||
: $"ClientMarginRate:*:{underlyingCode}:*";
|
||||
ylCache.BatchDelete(cachePattern);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogFactory.GetLogger("UnderlyingHelper").Error($"清除保证金率缓存时发生异常: {ex.Message}", ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取篮子标的品种对象
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user