This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//cache | |
public async Task<T> TryGet<T>(string key, Func<Task<T>> ifCacheMissAction) | |
{ | |
if (ifCacheMissAction == null) throw new ArgumentNullException("ifCacheMissAction"); | |
if (string.IsNullOrEmpty(key)) throw new ArgumentNullException("key"); | |
if (_isEnabled) | |
{ | |
RedisValue redisValue = Cache.StringGet(key); | |
// the following is a bit yolo | |
if (redisValue.HasValue && redisValue != "{}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class IntegrationClient : IIntegrationClient | |
{ | |
private readonly ISettings _settings; | |
public IntegrationClient(ISettings settings) | |
{ | |
if (settings == null) throw new ArgumentNullException("settings"); | |
_settings = settings; | |
} | |
public async Task<T> ExecuteGetRequest<T>(RestRequest request) | |
{ |
NewerOlder