Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Question about partial caching View modes: 
User avatar
Member
Member
matt.barry-stockhouse - 1/31/2013 11:50:00 AM
   
Question about partial caching
I have a repeater web-part in the footer of my master page that renders a few links. In order to speed things up, I've turned on partial caching. I set the "Partial cache minutes" field to 10 and set up the "Partial cache dependencies" field using the "node|<sitename>|<aliaspath>|childnodes" syntax.

When I debug the site, I can see that the partial cache is working. However if I navigate to a different page or log in as a different user, the cache does not get used, even though the content is the same.

Is there any way to re-use a partial cache between users and pages? Should I be using a content cache instead?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/4/2013 7:21:57 AM
   
RE:Question about partial caching
Hi,

By default the caching is per user. But using custom dependencies should overwrite this. What is your exact dependency key? what is the alias path in the cache debug?

Best regards,
Juraj Ondrus

User avatar
Member
Member
matt.barry-stockhouse - 2/4/2013 1:09:40 PM
   
RE:Question about partial caching
I am using a custom table repeater web part in portal mode. Here are the partial cache settings on the web part:

Partial cache minutes: 20
Use default cache dependencies: unchecked
Partial cache dependencies: customtableitem.sponsorednewslinks|all

Here is the debug output:
Partial cache (SponsoredNewsLinks)
customtableitem.sponsorednewslinks|all
partial
controlexpiracy||username=mattbarry|sitename=devalpha|lang=en-us|/markets|p_lt_zonecontent_subcontent_p_lt_zoneleft_sponsorednewslinks
template|1188

The first time I load the page, I see an "ADD" for the partial cache. When I refresh the page I see a "GET". When I log in as a different user, I expect to see another "GET", but it shows an "ADD" instead.

Thanks!

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/5/2013 2:27:53 AM
   
RE:Question about partial caching
Hi,

In this case, you need to add this key into the web.config file and change the default value which is "username;sitename;lang" and get rid of user name:

<add key="CMSPartialCacheItems" value="sitename;lang" />


Best regards,
Juraj Ondrus