/// <summary>
 /// Set cache in memory and return original object
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="obj"></param>
 /// <param name="key"></param>
 /// <param name="timeSpan"></param>
 /// <param name="useRollingInterval"></param>
 /// <returns></returns>
 public T SetCache <T>(T obj, CacheKeys key, TimeSpan?timeSpan = null, bool useRollingInterval = false, int size = 1)
 {
     if (timeSpan != null)
     {
         _timeSpan = (TimeSpan)timeSpan;
     }
     _useRollingInterval = useRollingInterval;
     _ObjectSize         = size;
     _cache.Set(key.ToString(), obj, GetCachingOption());
     return(obj);
 }
 /// <summary>
 /// Remove cache on requested key
 /// </summary>
 /// <param name="key"></param>
 public void RemoveCache(CacheKeys key)
 {
     _cache.Remove(key.ToString());
 }
 /// <summary>
 /// Attempt to get the object from cache
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="key"></param>
 /// <returns></returns>
 public T GetCache <T>(CacheKeys key)
 {
     return((T)_cache.Get(key.ToString()));
 }