Here's a link to the documentation to the current (1.1) version of the method...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebcachingcacheclassinserttopic4.asp

Your call should look something like this...

HttpRuntime.Cache.Insert("Catalog",catalogds,null,DateTime.MaxValue,TimeSpan.FromHours(24),CacheItemPriority.High,null);

Which will keep in the cache for 24 hours.
   


On 8/19/05, Osama M.Bahgat <[EMAIL PROTECTED]> wrote:
> I'm just trying to put my shopping cart into cash
> ======================================
> 
> protected void GetCatalog()
> 
> {
> 
> // Load the catalog from cache
> 
> catalogds = (CatalogDS)HttpRuntime.Cache.Get("Catalog");
> 
> if (catalogds == null)
> 
> {
> 
> // Re-insert catalog into the cache
> 
> MyGolfGearDP dp = new MyGolfGearDP();
> 
> catalogds = new CatalogDS();
> 
> dp.FillCatalog(catalogds);
> 
> HttpRuntime.Cache.Insert("Catalog",catalogds,null,System.DateTime.MaxValue,System.TimeSpan.FromHours(24),CacheItemPriority.High,CacheItemPriorityDecay.Never,null);
> 
> }
> 
> }
> 
> ======================================
> 
> do you have a better way to do this?
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> 
> [Non-text portions of this message have been removed]
> 
> 
> 
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 


-- 
Dean Fiala
Very Practical Software, Inc
http://www.vpsw.com


------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hein52h/M=362329.6886308.7839368.1510227/D=groups/S=1705006764:TM/Y=YAHOO/EXP=1124486884/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to