|
Home > Archive > Microsoft Content Management Server > October 2005 > Turn off Caching for Templates / User Controls - Personalisation
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Turn off Caching for Templates / User Controls - Personalisation
|
|
| Shiraz Bhaiji 2005-10-12, 6:12 pm |
| Hi,
We have a menu which is filtered by user rights.
The menu is in a user control which we use on both aspx pages and MCMS
templates. On aspx pages it works fine.
Our problem is that the template based page get cached and therefore the
menu reflects the rights of the first user to access the page. Other
information on the page that is set in the page load event reflects the
rights of the user.
Users are identified by a token is placed in a cookie.
Is it possible to:
- Turn off caching for the template
- Turn off caching for the user controll
- force the regeneration of the menu in page load
It is actualy a Web Control wraped in a user control, would it make
difference if I used the web control directly.
Thanks
Shiraz
| |
| Mei Ying [MVP] 2005-10-12, 6:12 pm |
| Hi
It's probably a good idea to check to see if output caching has been applied
anywhere on the server - at the machine/project/page/control level.
Take a look at this article which describes how output caching can be
disabled:
http://msdn.microsoft.com/library/e...ilityofpage.asp
--
regards
Mei Ying
---
Blog: http://meiyinglim.blogspot.com
Book: http://www.packtpub.com/book/mcms
Contact: meiyinglim@hotmail.com
---
"Shiraz Bhaiji" wrote:
> Hi,
>
> We have a menu which is filtered by user rights.
>
> The menu is in a user control which we use on both aspx pages and MCMS
> templates. On aspx pages it works fine.
>
> Our problem is that the template based page get cached and therefore the
> menu reflects the rights of the first user to access the page. Other
> information on the page that is set in the page load event reflects the
> rights of the user.
>
> Users are identified by a token is placed in a cookie.
>
> Is it possible to:
> - Turn off caching for the template
> - Turn off caching for the user controll
> - force the regeneration of the menu in page load
>
> It is actualy a Web Control wraped in a user control, would it make
> difference if I used the web control directly.
>
> Thanks
>
> Shiraz
>
>
>
| |
| Stefan [MSFT] 2005-10-12, 6:12 pm |
| Hi Shiraz,
if the template is cached and a user control, then the template will always
win.
That is by design in ASP.NET.
You need to ensure that the template is also varied by user role and not
only the control.
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------
"Shiraz Bhaiji" <shab@ementor.no> wrote in message
news:eD01nHnzFHA.3180@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> We have a menu which is filtered by user rights.
>
> The menu is in a user control which we use on both aspx pages and MCMS
> templates. On aspx pages it works fine.
>
> Our problem is that the template based page get cached and therefore the
> menu reflects the rights of the first user to access the page. Other
> information on the page that is set in the page load event reflects the
> rights of the user.
>
> Users are identified by a token is placed in a cookie.
>
> Is it possible to:
> - Turn off caching for the template
> - Turn off caching for the user controll
> - force the regeneration of the menu in page load
>
> It is actualy a Web Control wraped in a user control, would it make
> difference if I used the web control directly.
>
> Thanks
>
> Shiraz
>
>
|
|
|
|
|