Portal Engine
Version 2.x > Portal Engine > WebPart caching View modes: 
User avatar
Member
Member
andy-citroen-restoration.co - 9/29/2009 4:11:01 AM
   
WebPart caching
Hi

It seems like the webparts in one of our Kentico sites (v2.3.2816) are being cached beyond our control.

When I'm developing a new usercontrol I have to click "Restart Application" in the Site Manager after every change to see it on the page, otherwise the old version is displayed.

The cache times are all set to 0 in the CMS but it still seems as if the usercontrols are being cached.

Is there anything I can check to stop this behaviour?

(To clarify - they aren't being cached in the browser, they must be in a server cache)

Thanks
Andy

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 9/29/2009 5:15:43 AM
   
RE:WebPart caching
Hi,

does this new usercontrol inherit from CMSAbstractWebpart class?
With the cache times, do you mean the caching settings in Site Manager or caching settings for the page?
To disable caching for the webpart, you can also specify CacheMinutes="0" directly as the webpart property (attribute).

Please let me know if direct settings doesn't help or if you need more details. Thanks.

Regards,
Zdenek C.

User avatar
Member
Member
andy-citroen-restoration.co - 9/29/2009 5:27:27 AM
   
RE:WebPart caching
Hi

Yes - it inherits CMSAbstractWebpart.

The cache times were set in Site Manager, I'm not touching the caching at ASP.NET page level (I presume that's what you mean?)

I'll try setting the CacheMinutes property on the webpart and see if that helps.

Thanks
Andy

User avatar
Member
Member
andy-citroen-restoration.co - 9/29/2009 5:32:20 AM
   
RE:WebPart caching
Hi

An update - setting CacheMinutes=0 didn't make any difference. I set it in Page_Load on the webpart:

protected void Page_Load(object sender, EventArgs e)
{
this.CacheMinutes = 0;
}


Still any change I make to the ascx page requires that I click the restart application button in Site Manager for the change to appear. This is the case when it's running on my local IIS and on the live webserver.

Thanks
Andy

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 9/30/2009 12:09:29 PM
   
RE:WebPart caching
Hi Andy,

thank you for the reply and info...I'm sorry it doesn't work. Could you please verify if the caching settings are inherited correctly in SiteManager? Another thought is to try clearing the .net cache...

Could you also try to run your usercontrol in the higher KenticoCMS version? There is at least a later build available (2.3.2838 - known as 2.3a), however we'd recommend trying to upgrade to the newest version if possible.
You can find upgrade packages at:
http://www.kentico.com/Download/Upgrades.aspx
(instructions are included in the package)

Thank you in advance for any further information on the status.

Regards,
Zdenek C.