protected virtual async Task <AppCacheItem> GetCacheItemAsync(string name, string providerName, string providerKey)
        {
            var cacheKey  = CalculateCacheKey(name, providerName, providerKey);
            var cacheItem = await Cache.GetAsync(cacheKey);

            if (cacheItem != null)
            {
                return(cacheItem);
            }

            var app = await AppRepository.FindAsync(name, providerName, providerKey);

            cacheItem = new AppCacheItem(app?.Value);

            await Cache.SetAsync(
                cacheKey,
                cacheItem
                );

            return(cacheItem);
        }
 protected virtual string CalculateCacheKey(string name, string providerName, string providerKey)
 {
     return(AppCacheItem.CalculateCacheKey(name, providerName, providerKey));
 }