E
Ed
Hi all,
Have a strange situation regarding fragment caching. I've read the docs and
kbs on this so it's either I've missed some key aspect of the implementation
or there is a "gotcha" here that isn't described in these resources
(kb/docs).
Brief:
-----
We've had a production level *page* caching (whole page) implementation
running for some time now, which works perfectly.
We need to add a user control that is dynamic. This therefore means that we
have to "segment" the page, which is already made up of user controls
(ascx), and implement *fragment* caching where one or more user controls in
the page will remain dynamic, the rest is output from cache. Sounded simple
enough.....
Result:
------
Adding the OutputCache directive to the specific usercontrol we do want to
cache (the "expensive" one that queries and displays data from db), doesn't
work as expected:
- it shows up on initial request, as expected, including any paging data
(page 1, 2, etc...)
- it *does not* show up on subsequent request, *until after duration
directive*, so if the duration is 10, then it will only display after 10
seconds. So you can say, it "somewhat" works...it's just that the supposed
cached data isn't there at all.
There is no other @ OutputCache directive, on the containing page (aspx),
nor any other user control (ascx) on the page. Resutls are identical when
implemented programatically via <PartialCaching>.
I'm pretty sure we're missing a key concept of fragment caching something
here, that or a limitation that isn't entirely documented.
Thanks to anyone who can offer advice.
Have a strange situation regarding fragment caching. I've read the docs and
kbs on this so it's either I've missed some key aspect of the implementation
or there is a "gotcha" here that isn't described in these resources
(kb/docs).
Brief:
-----
We've had a production level *page* caching (whole page) implementation
running for some time now, which works perfectly.
We need to add a user control that is dynamic. This therefore means that we
have to "segment" the page, which is already made up of user controls
(ascx), and implement *fragment* caching where one or more user controls in
the page will remain dynamic, the rest is output from cache. Sounded simple
enough.....
Result:
------
Adding the OutputCache directive to the specific usercontrol we do want to
cache (the "expensive" one that queries and displays data from db), doesn't
work as expected:
- it shows up on initial request, as expected, including any paging data
(page 1, 2, etc...)
- it *does not* show up on subsequent request, *until after duration
directive*, so if the duration is 10, then it will only display after 10
seconds. So you can say, it "somewhat" works...it's just that the supposed
cached data isn't there at all.
There is no other @ OutputCache directive, on the containing page (aspx),
nor any other user control (ascx) on the page. Resutls are identical when
implemented programatically via <PartialCaching>.
I'm pretty sure we're missing a key concept of fragment caching something
here, that or a limitation that isn't entirely documented.
Thanks to anyone who can offer advice.