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

Cache for asp.net user control

Here is a user control on the page, how do I cache it by user?
Currently I think we could put a server control for example ID:textusername
in the asp.net page whose value is username, so we can utilize Output cache
with varybycontrol to control the cache.

Queation:
If this is right direction, does this control ID:textusername need to be in
the user control or just in the asp.net page?

How do I check if it has been cached successfully?

If there are 2000 users, how do I check the memory the cache used?

Thanks,
-Billy
Jun 27 '08 #1
3 1250
Hello Billy,

emm, not quite understand what do u want to get.
Cache the user name or the value of the control?!
To have the user-specific cache your can use the Session, or put the value
to the Cache class with the user name key and hashed by username (to make
it a bit secure in case of accessing this value from other user)

---
WBR,
Michael Nemtsev [Microsoft MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
BZHere is a user control on the page, how do I cache it by user?
BZCurrently I think we could put a server control for example
BZID:textusername in the asp.net page whose value is username, so we
BZcan utilize Output cache with varybycontrol to control the cache.
BZ>
BZQueation:
BZIf this is right direction, does this control ID:textusername need
BZto be in
BZthe user control or just in the asp.net page?
BZHow do I check if it has been cached successfully?
BZ>
BZIf there are 2000 users, how do I check the memory the cache used?
BZ>
BZThanks,
BZ-Billy
Jun 27 '08 #2
I want to cache a usercontrol by using Output cache.
There are two ways: VaryByControl and VaryByCustom.

Since I want to cache this usercontrol by different user, could i use
VaryByControl to control this?

If there are 2000 users, how do I check the memory the cache used?

"Michael Nemtsev [MVP]" wrote:
Hello Billy,

emm, not quite understand what do u want to get.
Cache the user name or the value of the control?!
To have the user-specific cache your can use the Session, or put the value
to the Cache class with the user name key and hashed by username (to make
it a bit secure in case of accessing this value from other user)

---
WBR,
Michael Nemtsev [Microsoft MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
BZHere is a user control on the page, how do I cache it by user?
BZCurrently I think we could put a server control for example
BZID:textusername in the asp.net page whose value is username, so we
BZcan utilize Output cache with varybycontrol to control the cache.
BZ>
BZQueation:
BZIf this is right direction, does this control ID:textusername need
BZto be in
BZthe user control or just in the asp.net page?
BZHow do I check if it has been cached successfully?
BZ>
BZIf there are 2000 users, how do I check the memory the cache used?
BZ>
BZThanks,
BZ-Billy
Jun 27 '08 #3
Hello Billy,

I am writing to check the status of the issue on your side. Would you mind
letting me know the result of the suggestions? If you need further
assistance, feel free to let me know. I will be more than happy to be of
assistance.

Have a great day!

Regards,
Jialiang Ge (ji****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================

Jun 27 '08 #4

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

Similar topics

7
by: A.M | last post by:
Hi, How can I change the duration of user control's cache inside asp.net's C# code? Any help would be apprecited, Alan
4
by: Guadala Harry | last post by:
Is there any way for one Session to remove and update objects in another Session? I seriously doubt it, but thought I'd ask. Here's why: I have some data that is unique per user (or per session -...
5
by: Darrel | last post by:
I thought this warranted a new thread. Yesterday I asked about access relatively static content...is it better to read from the DB, or just grab a text file. It was suggested that I use the DB...
3
by: poolieweb | last post by:
I have created a custom user control which creates a ASPxMenu ( Same fucntion as standard menu control) from data retreved from a webservice (Reporting Services) which deals with user access. This...
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
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...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
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: 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
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.