Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Cache removal seems to be missing when a document type instance is changed in CMS Desk? View modes: 
User avatar
Member
Member
KeithR - 7/23/2009 6:07:41 PM
   
Cache removal seems to be missing when a document type instance is changed in CMS Desk?
I am trying to take advantage of Kentico's built in caching, expecting that when an item is updated in the cms that the system Cache entry will be cleared/updated.

It is however not being cleared. Why doesn't saving the document type instance item clear the cache entry? Is there any cms item caching that is automatically cleared/updated when its changed in the desk?

Here's what I'm trying, so if I should be doing something else or it just won't work, please advise.

1) using 4.0 w/ no hotfixes installed
2) using aspx template
3) using a document type instance to hold some content in a LongText field.
4) the document type instance is aliased to /index.aspx and uses an aspx template that is an existing page in an existing site 3.5 site.
5) using <cms:CMSDocumentValue> control to pull values out of the document type instance

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 7/29/2009 2:20:35 AM
   
RE:Cache removal seems to be missing when a document type instance is changed in CMS Desk?
Hi,

Could you please let us know if you are using full-page caching option on your page since <cms:CMSDocumentValue> control doesn’t use any caching options, so it should display current document value if full page cache is disabled.

Best Regards,
Miroslav Remias.

User avatar
Member
Member
KeithR - 7/29/2009 12:41:21 PM
   
RE:Cache removal seems to be missing when a document type instance is changed in CMS Desk?
Hmm, I guess I need you to explain what you mean by "full-page caching" to answer your question.

The template .aspx page is not using asp output caching.

In this case, "page info" data gets properly updated whenever anything on the "Properties" tab is updated (such as the Title) or any "content" is updated via a <cms:CMSEditableRegion /> control.

However, the "Form" tab changes against the document type data are not updated, even when those other values are. And I have confirmed it does not make a database call, so where is it getting cached?

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 7/30/2009 5:23:02 AM
   
RE:Cache removal seems to be missing when a document type instance is changed in CMS Desk?
Hi,

Thank you for letting us know about this issue. Unfortunately, this seems to be a bug in the current version. We will try fix it in the nearest version or in the next hotfix package for this particular Kentico CMS version. Currently the workaround is to add following code:

string key = "currentdocument_" + node.DocumentID;
CacheHelper.Remove(key);


Into ~\CMSDesk\Content\edit.aspx.cs file into SaveDocument() method after following code:

Line about(429): formElem.Save(node);


I'm very sorry for this inconvenience.

Best Regards,
Miroslav Remias.

User avatar
Member
Member
KeithR - 7/30/2009 3:48:25 PM
   
RE:Cache removal seems to be missing when a document type instance is changed in CMS Desk?
Thank you Miro, that fixed it!