473,394 Members | 1,794 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Server Cache Question

I have googled to try and find an answer to this issue, but everything I
found
beats around the bush.

I have a web service that calls a DLL. In the DLL, I want to cache the small
table
data into server cache rather than hit the DB each time, since the data does
not
change for at least a day.

My question is, will this cache still be there when the web service is
invoked
again? Or does the cache only last as long as the web service (and DLL) is
instantiated?

Here is a snippet of the code:

try {
ds = (DataSet)HttpRuntime.Cache.Get("AVMPolicies");
} catch (Exception ex) {
strErrMsg += ex.Message;
throw new Exception(strErrMsg);
}
....
if (ds == null) {
//cache gone, get from DB
try {
//ORACLE
ds = OraRules.GetPoliciesDB();
//OTHER
//...
} catch (Exception ex) {
//bubbled
throw new Exception(ex.Message);
}
....
//store in cache
try {
HttpRuntime.Cache.Add("AVMPolicies",ds,null,DateTi me.Now.AddMinutes(intTimeout),TimeSpan.Zero,CacheI temPriority.High,null);
} catch (Exception ex) {
strErrMsg += ex.Message;
throw new Exception(strErrMsg);
}
....
================================================== ====================
intTimeout is 15.

Thanks,
Bob
Apr 8 '06 #1
0 893

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: JL | last post by:
To All, I have a SQL2KSP3a database(<1GB) running on a 4x3GB physical CPU with 4GB of ram. It is Windows Server 2003 with hyper-threading turn on. There are ~420 .Net users/cxns (fat client, no...
2
by: angus | last post by:
Hi All, i have an aspx form for the user to input, and those data will be stored into the database. I would like to build up the form dynamically by using the data in the a database table,...
15
by: randyr | last post by:
I am developing an asp.net app based on a previous asp application. in the asp applications global.asa file I had several <object id="id" runat="server" scope="scope" class="comclass"> tags for...
0
by: Bishop | last post by:
I have googled to try and find an answer to this issue, but everything I found beats around the bush. I have a web service that calls a DLL. In the DLL, I want to cache the small table data...
4
by: Pedro Leite | last post by:
Good Afternoon. the code below is properly retreiving binary data from a database and saving it. but instead of saving at client machine is saving at the server machine. what is wrong with my...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
5
by: Joseph Geretz | last post by:
Of course, I can store a C# class instance to the Server Cache (this.Context.Cache). I've tried it. My question is, will this destroy the scalability of my application? My background is VB6....
2
by: moondaddy | last post by:
I had to repost this because I had to update and change my msdn alias. I will re-ask the question and clarify a few things that were not clear before. This code is all executed on my dev...
3
by: graphicssl | last post by:
Okay, so first of all, I'm a designer first and a light coder second (I'm only really trained with HTML and CSS). So I apologize for having to post about something that's probably super-trivial! ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.