API.DataAccess.CacheManager.SetPlatformTags C# (CSharp) Метод

SetPlatformTags() приватный Метод

private SetPlatformTags ( string platformTagsJson ) : void
platformTagsJson string
Результат void
        internal void SetPlatformTags(string platformTagsJson) => Connection.GetDatabase().StringSet(_platformTagsKey, platformTagsJson);

Usage Example

        public async Task <Dictionary <int, int> > GetPlatformTagsAsync()
        {
            var cacheJson = await _cacheManager.GetPlatformTagsAsync();

            if (string.IsNullOrWhiteSpace(cacheJson))
            {
                var storageJson = await _storageManager.GetPlatformTagsAsync();

                _cacheManager.SetPlatformTags(storageJson);
                return(JsonConvert.DeserializeObject <Dictionary <int, int> >(storageJson));
            }

            return(JsonConvert.DeserializeObject <Dictionary <int, int> >(cacheJson));
        }