private void Initialize()
 {
     if (isInitialized == false)
     {
         provider      = CacheServiceHelper.GetRedisCacheServiceProvider();
         isInitialized = true;
     }
 }
 /// <summary>
 /// Creates an object to interact with the caching service
 /// </summary>
 /// <param name="userId">The id of the user that interacts with the caching service</param>
 /// <param name="siteMode">The siteMode in which the user is in</param>
 /// <param name="cacheProvider">The provider of the caching service</param>
 public CacheWorker(int userId, CacheServiceProvider cacheProvider)
 {
     this.cacheProvider = cacheProvider;
     cacheProvider.Connect(userId);
 }