This seems like a long time (24 hrs) to cache a shopping cart... I had a
similar need where I cached the shopping cart for 30 minutes and allowed
users to persist it to a SQL base for anything after that.  Just seems like
for a window of 24 hrs you are chewing up memory especially if you expect to
scale it.

Travis D. Falls | Consultant   RAFT.Net   IT | 860.547.4070 |
[EMAIL PROTECTED]


-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] Behalf Of Dean Fiala
Sent: Friday, August 19, 2005 3:28 PM
To: [email protected]
Subject: Re: [AspNetAnyQuestionIsOk]
System.Web.Caching.CacheItemPriorityDecay not found :-(


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,S
ystem.TimeSpan.FromHours(24),CacheItemPriority.High,CacheItemPriorityDecay.N
ever,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 Links



 



*************************************************************************
PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is
for the exclusive use of addressee and may contain proprietary,
confidential and/or privileged information.  If you are not the intended
recipient, any use, copying, disclosure, dissemination or distribution is
strictly prohibited.  If you are not the intended recipient, please notify
the sender immediately by return e-mail, delete this communication and
destroy all copies.
*************************************************************************



------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hi1qvjn/M=362329.6886308.7839368.1510227/D=groups/S=1705006764:TM/Y=YAHOO/EXP=1124487209/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