Output caching variable 'Domain' in combination with partial caching

Kenny Deblaere asked on July 7, 2017 08:41

Hello

My website has multiple domains, with small changes on the page.

I've configured Output caching with following cache dependencies

  • lang
  • cookielevel
  • domain

I want to speed up the first request on a domain on a non-cached page, so my idea is to enable partial caching on the webparts, which are the same on every domain.

Will this speed up the first request, or are there other ways to speedup the site, using output caching?

Kind regards

Kenny

Correct Answer

Peter Mogilnitski answered on July 7, 2017 13:48

I guess the best answer to your question is to enable cache/sql debug and check if what you are caching is actually being taken from the cache in another request. On top of that you can always go to Debug\caches items\ and see if a key is formed the way you wanted.

It seems that you are mixing up the two things: partial (for web parts) and output caching (for the whole page). They are configured independently.

P.S. Some web parts have 'System settings' with 'Cache item name' property which is actually the cache key. So can call it 'TopMenu' and this will be the cachekey ;) you can use macro when you forming the name.For example 'TopMenu{%CurrentDocument.DocumentCulture|(identity)GlobalAdministrator%}'

1 votesVote for this answer Unmark Correct answer

Recent Answers


Kenny Deblaere answered on July 7, 2017 15:09

Hi Peter

I've been looking into the cache debugging and It gives on an empty cache request:

  • SEt Pageinfo caching
  • Set Content caching
  • Set Partial caching
  • Set Output caching

When triggering the same url on another domain it does:

  • Add pageInfo
  • Get content
  • Get partial
  • Set output

I guess this is correct. Thanks for your answer.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.