Hi.
I think I have some problems with caching in EPiServer CMS 5.1. I have made my own pager to use in EPiServer:PageList and EPiServer:NewsList. The pager works fine in EPiServer CMS 4.61, but I have some problems in EPiServer CMS 5.1.
The pager uses anchor tags instead of linkbuttons, and it will also list out the pagingitems with
, , and
elements. Other than that, it uses the same code as the regular EPiServer PagingControl. The PagingControl.CurrentPagingItemIndex is determined by the parameter p= in the querystring. When a anchor tag is clicked, the CurrentPagingItemIndex is either steped by one or reduced by one. I see that the url is updated right every time, but the list struggels a bit. Some times it is updated on the click, and sometimes I have to click the button 5 times for the list to respond. In every click, I can see the url is right and the p= parameter is steped/reduced by the right amount.
If I go in debug mode in Visual Studio and click my way through the pager, then the list is displaying the right CurrentPagingItemIndex every time. I have added the p= paramter in the httpCacheVaryByParams i Web.Config, and the httpCacheExpiration is set to 00:00:00. Does anyone have a clue why this pager doesn`t work? It works fine in EPiServer CMS 4.61 and it works fine i Visual Studio debug mode, so why won`t it work in regular view mode?!
BR,
Tore
Hi Tore!
There is a bug in the EPiServer CMS 5 release with the friendly url cache. The behavior is that a furl address is cached for a couple of seconds (10 default). If an additional request comes within that time but with a different query string this is ignored. This bug has been fixed in the SP1 release.
A workaround for the release version is to enter the attribute friendlyUrlCacheAbsoluteExpiration="0:0:0" on the FriendlyUrlRewriteProvider definition, i e
,
, and- elements. Other than that, it uses the same code as the regular EPiServer PagingControl. The PagingControl.CurrentPagingItemIndex is determined by the parameter p= in the querystring. When a anchor tag is clicked, the CurrentPagingItemIndex is either steped by one or reduced by one. I see that the url is updated right every time, but the list struggels a bit. Some times it is updated on the click, and sometimes I have to click the button 5 times for the list to respond. In every click, I can see the url is right and the p= parameter is steped/reduced by the right amount.
If I go in debug mode in Visual Studio and click my way through the pager, then the list is displaying the right CurrentPagingItemIndex every time. I have added the p= paramter in the httpCacheVaryByParams i Web.Config, and the httpCacheExpiration is set to 00:00:00. Does anyone have a clue why this pager doesn`t work? It works fine in EPiServer CMS 4.61 and it works fine i Visual Studio debug mode, so why won`t it work in regular view mode?!
BR,
Tore