Argentini.Halide.H3Caching.Cache C# (CSharp) Method

Cache() public static method

Output Caching wrapper method. Caches an object for the number of seconds specified.
public static Cache ( String key, Object value, Int32 expirationSeconds ) : void
key String Unique name of the cached item
value Object Object to store in the cache
expirationSeconds System.Int32 Expiration time, in seconds, from the current date and time.
return void
        public static void Cache(String key, Object value, Int32 expirationSeconds)
        {
            HttpContext.Current.Cache.Add(key, value, null, DateTime.Now.AddSeconds(Convert.ToDouble(expirationSeconds)), System.Web.Caching.Cache.NoSlidingExpiration, System.Web.Caching.CacheItemPriority.Normal, null);
        }

Same methods

H3Caching::Cache ( String key, Object value ) : void
H3Caching::Cache ( String key, Object value, System.DateTime expirationDateTime ) : void
H3Caching::Cache ( String key, String value ) : void
H3Caching::Cache ( String key, String value, System.DateTime expirationDateTime ) : void
H3Caching::Cache ( String key, String value, Int32 expirationSeconds ) : void