public async Task <string> SaveLoginAsync(LoggedinUserModel loggedinUserModel)
        {
            string cacheKey = _cacheKeyCreator.CreateKey();

            await Task.Run(() =>
            {
                var memoryCacheEntryOptions = new MemoryCacheEntryOptions()
                                              .SetSlidingExpiration(TimeSpan.FromSeconds(300));
                _memoryCache.Set(cacheKey, loggedinUserModel, memoryCacheEntryOptions);
            });

            return(cacheKey);
        }
        public async Task <string> SaveLoginAsync(LoggedinUserModel loggedinUserModel)
        {
            string cacheKey = _cacheKeyCreator.CreateKey();

            string json = JsonConvert.SerializeObject(loggedinUserModel);

            byte[] val = Encoding.UTF8.GetBytes(json);
            var    distributedCacheEntryOptions = new DistributedCacheEntryOptions()
                                                  .SetSlidingExpiration(TimeSpan.FromSeconds(300));
            await _distributedCache.SetAsync(cacheKey, val, distributedCacheEntryOptions);

            return(cacheKey);
        }