473,804 Members | 3,029 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1275
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:textuserna me 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:textuserna me 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****@microsof t.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
1545
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
2758
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 - similar to "welcome back, Jim" after Jim logs in) and consumed across multiple pages. This "per user" data lives in a database, so toward improving runtime performance I want to cache data supporting this and similar per user features. Because the...
5
1738
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 and look into the Application Cache settings. I found a good article here: http://www.developer.com/net/net/article.php/1477771
3
3065
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 process is slow. And as the menu object will not change in a session I am trying to cache the menu with the session user as the key. The problem is that I can not retreve the menu object after the first request. The menu items are resident in the...
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10326
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10075
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7615
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6851
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5520
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.