469,607 Members | 2,099 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,607 developers. It's quick & easy.

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 1326
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by moko | last post: by
reply views Thread by Troy Simpson | last post: by
3 posts views Thread by Janaka | last post: by
2 posts views Thread by George1776 | last post: by
4 posts views Thread by Hermann | last post: by
reply views Thread by guiromero | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.