Exemple #1
0
 /// <summary>
 /// 存储数据
 /// </summary>
 /// <param name="fileConfiguration"></param>
 /// <returns></returns>
 public Task <Response> Set(FileConfiguration fileConfiguration)
 {
     lock (_lock)
     {
         _cache.AddAndDelete(options.Value.CacheKey, fileConfiguration, TimeSpan.FromHours(6), "");
     }
     return(Task.FromResult((Response) new OkResponse()));
 }
Exemple #2
0
 /// <summary>
 /// 存储数据
 /// </summary>
 /// <param name="fileConfiguration"></param>
 /// <returns></returns>
 public Task <Response> Set(FileConfiguration fileConfiguration)
 {
     lock (_lock)
     {
         SetFileConfiguration(fileConfiguration);
         _cache.AddAndDelete(options.Value.CacheKey, fileConfiguration, TimeSpan.FromSeconds(120), options.Value.CacheKey);
     }
     return(Task.FromResult((Response) new OkResponse()));
 }
 public Task <Response> Set(FileConfiguration fileConfiguration)
 {
     _cache.AddAndDelete(_option.CachePrefix + "FileConfiguration", fileConfiguration, TimeSpan.FromSeconds(1800), "");
     return(Task.FromResult((Response) new OkResponse()));
 }