473,408 Members | 1,762 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,408 software developers and data experts.

server caching

Does anyone know how a component can be cached server side. I know how to
cache a component and it works, but I think this is client side caching,
because it works with the current HttpContext.

....
Cache cache = HttpContext.Current.Cache;
Table table;
// Get the table from the cache
table = (Table) cache.Get("myCacheKey");

// If nothing is found, create the table and insert it in the cache
if (table == null)
{
table = new Table();
SetTable; // This function creates the table
cache.Insert("myCacheKey", table, null, DateTime.Now.AddMinutes(5),
TimeSpan.Zero);
}
....
Nov 16 '05 #1
3 3077
Hi Jo:

HttpContext.Current.Cache is a server side cache. HttpContext
represents various properties about the state of the current request
as it executes on the server.

--
Scott
http://www.OdeToCode.com

On Mon, 16 Aug 2004 16:38:40 +0200, "Jo Versmissen" <jv*@pss.be>
wrote:
Does anyone know how a component can be cached server side. I know how to
cache a component and it works, but I think this is client side caching,
because it works with the current HttpContext.

...
Cache cache = HttpContext.Current.Cache;
Table table;
// Get the table from the cache
table = (Table) cache.Get("myCacheKey");

// If nothing is found, create the table and insert it in the cache
if (table == null)
{
table = new Table();
SetTable; // This function creates the table
cache.Insert("myCacheKey", table, null, DateTime.Now.AddMinutes(5),
TimeSpan.Zero);
}
...


Nov 16 '05 #2
Thanks Scott.

So this means that all the users get their info from the same cache.

Greetings,
Jo

"Scott Allen" <bitmask@[nospam].fred.net> schreef in bericht
news:c7********************************@4ax.com...
Hi Jo:

HttpContext.Current.Cache is a server side cache. HttpContext
represents various properties about the state of the current request
as it executes on the server.

--
Scott
http://www.OdeToCode.com

On Mon, 16 Aug 2004 16:38:40 +0200, "Jo Versmissen" <jv*@pss.be>
wrote:
Does anyone know how a component can be cached server side. I know how to
cache a component and it works, but I think this is client side caching,
because it works with the current HttpContext.

...
Cache cache = HttpContext.Current.Cache;
Table table;
// Get the table from the cache
table = (Table) cache.Get("myCacheKey");

// If nothing is found, create the table and insert it in the cache
if (table == null)
{
table = new Table();
SetTable; // This function creates the table
cache.Insert("myCacheKey", table, null, DateTime.Now.AddMinutes(5),
TimeSpan.Zero);
}
...

Nov 16 '05 #3
Hi Jo:

That is correct!

--s

On Mon, 16 Aug 2004 20:28:35 +0200, "Jo Versmissen"
<jv******@hotmail.com> wrote:
Thanks Scott.

So this means that all the users get their info from the same cache.

Greetings,
Jo


--
Scott
http://www.OdeToCode.com
Nov 16 '05 #4

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

Similar topics

14
by: diskoduro | last post by:
Hi!! Years ago I built a database to control the production of a little factory. The users wanted to work in a Windows Net workgroup so I created an mdb with all the tables and data an after...
0
by: Evgeny | last post by:
I'm trying to do server caching for some pages of a website I developed. All the pages include the same user control. In this user control I have the following 4 lines. ...
1
by: JJ | last post by:
Hi, What is the best way to debug an asp.net app on a server? What is the best way to check for performance issues on a certain webform? How about checking response times for webform. Also...
0
by: Jonaed | last post by:
Hello, I am having a problem with caching, or at least I think it is with caching. I have a simple <%= "text " + DateTime.Now.ToString() %> in one of my aspx files (that is included thru the...
3
by: Purti Malhotra | last post by:
Hi All, In our Web hosting environment we are using Virtual hosting i.e. multiple websites are on one server and multiple domains are pointing to a single website. Issue: We have two domains...
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...
2
by: Toni | last post by:
Hello! I'm trying to use ASP.NET caching with my web site and SQL Server, but I have a problem. I try to do everything according to the instructions like this page here:...
0
by: Toni | last post by:
Hello! I'm trying to get caching work with ASP.NET 2.0 and SQL Server Express Edition 2005, but I have a problem and I can't figure out what I'm still doing wrong. I have enabled the database...
5
by: Trapulo | last post by:
Hello, I'm developing an asp.net application that is connected to a remote system using WCF (wshttp binding). So I want to use a local cache to manage data that I receive from remote service. ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.