473,466 Members | 1,374 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Cacheing Business Objects

Hi, I have some business objects that are pretty simple. They get
instantiated and have a few properties, methods, and events. The business
objects talk to the database directly or access web services. But 99% of
the time when they are instantiated or initially used, they access a
database and receive a datatable.

Can someone show me how to do the following;
1) cache the business object in a way that it gets used by all of the users
to the web site. I would like to store it so that each subsequental user
does not cause the database to run the query again and I do not use up the
web server memory. Maybe after 5 minutes it can be emptyied from the cache?
2) cache the business object on a per user basis, so that once the users
session starts the object gets created and doesn't have to go back to the
server to run the query again. Unless maybe their session expires.

Does this make sense? You can talk back to me using a foo{} fake class
object. I will understand. I use 1.1 but will use 2.0 and maybe 3.0 next
year.

Thom
Nov 25 '06 #1
1 1132
Theres a lot of articles about on SQLCachedependency, whihc should answer
msot of your questions for you very easily.

Try this one for a starter:
http://www.eggheadcafe.com/articles/20060407.asp

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Thom Anderson" <th**@spamfree.netwrote in message
news:u$**************@TK2MSFTNGP04.phx.gbl...
Hi, I have some business objects that are pretty simple. They get
instantiated and have a few properties, methods, and events. The business
objects talk to the database directly or access web services. But 99% of
the time when they are instantiated or initially used, they access a
database and receive a datatable.

Can someone show me how to do the following;
1) cache the business object in a way that it gets used by all of the
users to the web site. I would like to store it so that each subsequental
user does not cause the database to run the query again and I do not use
up the web server memory. Maybe after 5 minutes it can be emptyied from
the cache?
2) cache the business object on a per user basis, so that once the users
session starts the object gets created and doesn't have to go back to the
server to run the query again. Unless maybe their session expires.

Does this make sense? You can talk back to me using a foo{} fake class
object. I will understand. I use 1.1 but will use 2.0 and maybe 3.0
next year.

Thom

Nov 26 '06 #2

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

Similar topics

10
by: Clive Backham | last post by:
I tried posting this on comp.infosystems.www.misc, but that group appears to get very little traffic. So now I'm trying here. If there is a more appropriate group, please let me know. I'm...
25
by: Stuart Hilditch | last post by:
Hi all, I am hoping that someone with some experience developing nTier apps can give me some advice here. I am writing an nTier web app that began with a Data Access Layer (DAL), Business...
2
by: headware | last post by:
I am new to 3-tiered design and am in the process of designing an application that will work with ASP.NET as well as Windows Forms (and possibly with a PDA of some sort down the road). My question...
5
by: G. Stewart | last post by:
The word "Business" in the term implies some sort of commercial aspects or connotations. But from what I can see, that is not necesserially the case at all? So what is the reasoning behind the...
8
by: Keith-Earl | last post by:
Okay, looking for a Best Practice. We are building a classic three tier app in VB.NET. When we load up a WebForm we have access to very useful objects such as the Session object. We frequently...
18
by: D Witherspoon | last post by:
I am developing a Windows Forms application in VB.NET that will use .NET remoting to access the data tier classes. A very simple way I have come up with is by creating typed (.xsd) datasets. For...
1
by: Nemisis | last post by:
hi guys, Currently converting an old classic asp system to a OOP asp.net application. We are building the new application using a 3 tier arcitecture and i was wondering about the following. ...
25
by: Penelope Dramas | last post by:
Hello, I'm in a front of very serious .net redesign/rewrite of an old VB6 application. I had been asked to make it .NET 2.0 and would like to ask couple of questions regarding data access as...
2
by: grawsha2000 | last post by:
Greetings, I am developing this N-tier business app. The problem I'm facing is when I try to pass business objects (employees, dept..etc) from business tier to data tier,i.e., the add method in...
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...
1
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.