By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,354 Members | 1,042 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,354 IT Pros & Developers. It's quick & easy.

Cache for asp.net user control

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.