Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Caching / August 2005

Tip: Looking for answers? Try searching our database.

System.Web.Caching.CacheItemPriorityDecay not found

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
OsamaBG - 14 Aug 2005 08:07 GMT
Hi All,
I'm trying to add this function to my code:
==================
HttpRuntime.Cache.Insert("Catalog",catalogds,null,System.DateTime.MaxValue,System.TimeSpan.FromHours(24),CacheItemPriority.High,CacheItemPriorityDecay.Never,null);
==================
but ther is an error arises:
-----
c:\inetpub\wwwroot\MyGolfMart\Components\OrderManager.cs(160): The type or
namespace name 'CacheItemPriorityDecay' could not be found (are you missing a
using directive or an assembly reference?)
-----
i'm imported the assembly system.web.dll, and i used it in my class useing
System.Web.Caching;

any help is appriciated.
Brock Allen - 15 Aug 2005 13:40 GMT
You need the System.Web.Caching namespace.

-Brock
DevelopMentor
http://staff.develop.com/ballen

> Hi All,
>
[quoted text clipped - 28 lines]
>
> any help is appriciated.
OsamaBG - 16 Aug 2005 05:08 GMT
Thanx to ur reply, but as i mentioned in my originl message that i'm already
added the namespace System.Web.Caching

> Hi All,
> I'm trying to add this function to my code:
[quoted text clipped - 11 lines]
>
> any help is appriciated.
Hibri - 16 Aug 2005 10:10 GMT
Hi,
You have an extra parameter,there is no "CacheItemPriorityDecay" parameter  
in the Cache.Insert method.
change your code  to

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

.Hibri
http://www.hibri.net

> Thanx to ur reply, but as i mentioned in my originl message that i'm  
> already
[quoted text clipped - 18 lines]
>>
>> any help is appriciated.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.