Cache Object

Last post 11-18-2008 11:50 PM by ASP.NET Dev. 1 replies.

Sort Posts:

  • Cache Object

    11-18-2008, 10:30 PM
    • Member
      65 point Member
    • NickKA
    • Member since 02-15-2003, 9:29 AM
    • Posts 171

    I copied the code below into an .ashx The code is from a MSDN example. Except I get an error:

    'System.Web.Caching.Cache' is a 'type' but is used like a 'variable' Why am I getting this error?

    if (Cache["Key1"] == null) //compile error on this line
                            Cache.Add("Key1", "Value 1", null, DateTime.Now.AddSeconds(60), Cache.NoSlidingExpiration, CacheItemPriority.High, onRemove);

     
  • Re: Cache Object

    11-18-2008, 11:50 PM
    Answer
    • Contributor
      4,305 point Contributor
    • ASP.NET Dev
    • Member since 12-09-2006, 7:20 AM
    • Kozhikode, Kerala, India
    • Posts 660
    Regards,
    Sandeep Kumar. M

    MCPD - Web Developer
    --------------------------------------------------
    Software Associates, Calicut, Kerala
    http://www.softwareassociates.in



Page 1 of 1 (2 items)