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

ASP.NET Caching

I'm trying to understand ASP.NET caching. I set the Page Output
directive to VaryByParams= None and the duration = 60.
Now whenever users hit my web app they can see each others data. Is
there anyway to cache the page without this happening or am I using
Page Output caching in the wrong situation?

It's a data entry web app that I'm trying to increase the performance
on.

Nov 19 '05 #1
10 1441
Using output caching caches the HTML for the page on the server and uses that
HTML for subsequent requests, rather than regenerating the code for each one.
This is why your users are seeing each other's data.

There are several other options and without more info about your app I can't
tell you which will work for you.

VaryByParam: If you are using paramters in the URL then you can use the
VaryByParam property with output cahching to store different versions of the
HTML based on the values of the parameter in the URL.

Partial Caching: If you want to cache only parts of the page and keep others
dynamic look into partial page or fragment caching.

Data Caching: This may be what you are looking for. You can cache the data
(DataSets, DataTables, etc) that you are using in your application. For
instance, you can cache a dataset then create a view for each user based on
thier selections.

There is a lot information about these options if you do some searching.

Hope this helps

"BillGatesFan" wrote:
I'm trying to understand ASP.NET caching. I set the Page Output
directive to VaryByParams= None and the duration = 60.
Now whenever users hit my web app they can see each others data. Is
there anyway to cache the page without this happening or am I using
Page Output caching in the wrong situation?

It's a data entry web app that I'm trying to increase the performance
on.

Nov 19 '05 #2
Hi Mr.BillGatesFan,

Storing the data in cache is always better from the view of performance.
Since you are storing the values in the cache, which is globally visible and
common for the entire application, all your usersare able to see the data..

What you can do is, use the VaryByControl and assign the session ID of the
user to a control, say a textbox, use VaryByControl and vary by the textbox
control...

So, two sessions will not overlap..

HTH,

Need any help, do post a msg back

Happy Coding
"BillGatesFan" wrote:
I'm trying to understand ASP.NET caching. I set the Page Output
directive to VaryByParams= None and the duration = 60.
Now whenever users hit my web app they can see each others data. Is
there anyway to cache the page without this happening or am I using
Page Output caching in the wrong situation?

It's a data entry web app that I'm trying to increase the performance
on.

Nov 19 '05 #3
My app is a mult-user app that consist of a web forms with 3 panels and
about 10 textboxes on each panel for the user to fill in. When they
iterate through the 3 panels and click the save button, the data is
saved to the database. And that is basically my app.

Is there any caching I can do to increase performance?

Thanks

Nov 19 '05 #4
What data is overlapping if all the user is doing is filling in textboxes.
Are you pulling data from a database for display anywhere? Do you have a
static header/footer/menu that could be cached?

Depending on the user load you should be careful when using the session id
to cache a seperate copy of the page for each user. If you have a high user
load you can see how using output caching to cache an individual copy of the
page for each user could cause problems.

"BillGatesFan" wrote:
My app is a mult-user app that consist of a web forms with 3 panels and
about 10 textboxes on each panel for the user to fill in. When they
iterate through the 3 panels and click the save button, the data is
saved to the database. And that is basically my app.

Is there any caching I can do to increase performance?

Thanks

Nov 19 '05 #5
BillGatesFan wrote:
I'm trying to understand ASP.NET caching. I set the Page Output
directive to VaryByParams= None and the duration = 60.
Now whenever users hit my web app they can see each others data. Is
there anyway to cache the page without this happening or am I using
Page Output caching in the wrong situation?

It's a data entry web app that I'm trying to increase the performance
on.


Caching is used in situations where the same html should be generated
by a possibly slow process. The html output is cached so that is doesn't
need to be regenerated.So this works best on "static" pages (or parts)
I don't think a data-entry form is a good choice for caching.

Where is the bottleneck in this case? Getting the form to the browser
or processing the completed form? In the second case you can't benefit
from caching.

--
Hans Kesting
Nov 19 '05 #6
Thanks. That cleared up alot of issues. Forums are a great place to
learn.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #7
Hans is certainly refering to page output caching, which caches html
generated by server-side code.

In the scenario you explained, I do not see any major need for caching.
However, just to make you aware for future use, you can also use the
Cache object on the server side to cache data.

Nov 19 '05 #8


I know what is really slowing performance down is these 3rd party
controls I'm using. The viewstate for them is huge! Also since I cannot
control the browser my users are using, I have to do all the validation
on the server.

One question I want to ask all of you. How compatible is Javascript with
all the browsers. Is there any version that is completely safe to use
with all browsers? Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #9
> One question I want to ask all of you. How compatible is Javascript with
all the browsers. Is there any version that is completely safe to use
with all browsers? Thanks
I don't know of any browsers that don't support JavaScript. ASP.Net uses it
extensively.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Bill Gates Brother" <no****@devdex.com> wrote in message
news:uj**************@TK2MSFTNGP14.phx.gbl...

I know what is really slowing performance down is these 3rd party
controls I'm using. The viewstate for them is huge! Also since I cannot
control the browser my users are using, I have to do all the validation
on the server.

One question I want to ask all of you. How compatible is Javascript with
all the browsers. Is there any version that is completely safe to use
with all browsers? Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 19 '05 #10


Alright. Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #11

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

Similar topics

15
by: olle | last post by:
Hi folks. I learning asp.net and compare it with traditional asp and Access-developing. The issue is this one: 1/I have this Ms Acceess adp-project application that works fine on my Ms Sql...
1
by: moko | last post by:
I want to know whether 'dataset caching' is at the client end , or the server ? Similarly is an aspx page caching at the server or client ? Are there any 'gotchas' with caching ?
0
by: Troy Simpson | last post by:
Hi, I have a website which is made up of dynamic pages. Each page that's loaded has some code which looks at which template to load amongst other things, which causes the page to take a little...
3
by: Janaka | last post by:
Hi All, I'm having a problem with Page Output caching on a page that contains a DataGrid. Basically the page pulls up some data for sales information from the DB. Some of this has to be...
1
by: Leo Muller | last post by:
I am impressed by the caching performance of .NET. However, there is one major obstacle that I haven't managed to solve yet. What I want to do is the following: I have a normal site, and a...
3
by: DC | last post by:
Hi, (ASP.Net 1.1) is it possible to (programmatically and globally) deactivate page fragment caching? We have only two scenarios, development stage where we want caching off and testing where we...
5
by: Raj | last post by:
What is the purpose of file system caching while creating a tablespace? Memory on the test server gets used up pretty quickly after a user executes a complex query(database is already activated),...
2
by: George1776 | last post by:
All, I've recently upgraded our production ASP.NET/C# application from framework 1.1 to 2.0. Since then I've been plagued by out-of-memory errors and problems with the cache object (which may...
0
by: jason | last post by:
hi experts, support.microsoft.com/kb/917072 and http://msdn.microsoft.com/msdnmag/issues/06/07/WebAppFollies/ As pointed out in these articles, users might get session variables belong to...
4
by: Hermann | last post by:
My site is a bit slow showing the main page so I thought caching query result in PHP will improve performace. Then I read MySQL documentation and saw that MySQL does have a caching feature. So......
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.