How to set output cache to never expire?

Posted by Shivanichhabra4u under ASP.NET on 2/11/2009 | Views : 5242 | Status : [Member] | Replies : 1
HttpContext.Current.Cache.Insert("HelpXML", objXmlDoc, New Caching.CacheDependency(strHelpMap), System.DateTime.Now.AddDays(30), Caching.Cache.NoSlidingExpiration)

how can i add cache to never expire in above line




Responses

Posted by: Raja on: 2/11/2009 [Member] Starter

Up
0
Down
Please visit following link to know how to set noAbsoluteExpiration.

http://msdn.microsoft.com/en-us/library/18c1wd61(VS.71).aspx

Also see the ready made code here.

http://www.koders.com/csharp/fid9FA3296A93FCEC320E310A64B8BCD60EBE44C672.aspx?s=mdef:insert

Thanks

Regards,
Raja, USA

Shivanichhabra4u, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response