-
Feb 15th, 2012, 04:18 AM
#1
Thread Starter
Addicted Member
Caching User Controls : A dark art?
Hello,
I have been working on a site recently that relies heavily on user controls.
With the site nearly complete we are now looking to improve efficiency with some caching.
I have been looking at a number of options. In some cases a simple varybyparam fits the bill. However some user controls don't suit this model for whatever reason.
This sent me down the line of PartialCaching where I vary the cache by property.
This seems to work a treat if I declare the property in my markup, ie <uc7:JustPublished ID="JustPublished1" runat="server" categoryid="101" />
however if the control sits on a page that has a number of variants and I set the property in the codebehind eg categoryid = 101 it does not vary the cache.
Anyone encounter anything similar or have any good suggestions?
Thanks for reading
BB
-
Feb 22nd, 2012, 11:30 AM
#2
Re: Caching User Controls : A dark art?
Hello billyblue,
Did you ever find a solution to this?
I can't say that this is something that I have ever done, so I don't know the best way to guide you.
Sorry!
Gary
-
Feb 22nd, 2012, 11:42 AM
#3
Thread Starter
Addicted Member
Re: Caching User Controls : A dark art?
Hi Gep,
Afraid not. I just ended up caching my data in the codebehind. I am assuming this is less efficient that caching the whole control but I couldn't find an example of this working unfortunately.
Thanks
Scott
-
Feb 22nd, 2012, 12:46 PM
#4
Re: Caching User Controls : A dark art?
That is a shame
I am sure that there is a way, but I am not familiar with one.
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|