Dummy cache keys for category/tag/navigation

Aaron Macdonald asked on January 19, 2023 05:37

Hello all

There are no dummy cache keys mentioned in the documentation below which will detect changes to pages based a category, tag or navigation state.

https://docs.xperience.io/configuring-xperience/configuring-caching/setting-cache-dependencies

If anyone can please advise that would be much appreciated.

We're looking for the aforementioned keys to clear cache based on a add/update/delete to pages marked as primary menu items or footer menu items.

Correct Answer

Arjan van Hugten answered on January 19, 2023 16:58

You can set cache dependencies on objects. That can be used to set dependencies on document categories:

cms.documentcategory|all

And for the document tags you can use:

cms.documenttag|all

I was thinking about using the "cms.document" object for the "ShowInMenu" field but that doesn't seem to work sadly.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Arjan van Hugten answered on January 19, 2023 17:33 (last edited on January 19, 2023 17:34)

I did get the cms.tree|all to work for updates to pages eg. when changing the "ShowInMenu" value.

But this isn't specific for changes to the show in menu option, so it will cause the cache value to be updated frequently.

0 votesVote for this answer Mark as a Correct answer

Aaron Macdonald answered on January 22, 2023 23:59

Thanks again Arjan. +1 vote for MVP!

0 votesVote for this answer Mark as a Correct answer

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