The Content Cache is currently out of date

Hi. What does it mean exactly that the Content Cache is currently out of date? Obviously there is some caching of content happening and it's out of date but could you please detail what precisley happens when REBUILD CACHE is clicked? Thank you.

icc's picture

Hi, I'm glad that you asked!

Each content has a separate cache – the first time some content is viewed a function runs through the Parameter Tree(the one generated by the editor). This is done to ensure that none of the fields contain any disallowed content, dangerous scripts tags or similar. Also, it looks at which sub-content is used inside the content and generates a list of which JavaScript libraries that needs to be loaded when viewing the content, i.e. a content dependency list.

Everytime you update/edit/save your content its cache is invalidated, the same happens when you update a library, the cache for all content using that library is invalidated. This cache is automatically rebuilt each time you view a content so why do we need a button for doing it? Well, the button is really only there to allow you to delete libraries/content types from your site. Say if you want to delete Multiple Choice you first need to know that none of your content is using it, if not you'll end up breaking all of that content – and to know this you'll need to have the content dependency lists for all of the content on your site – which the rebuild cache button will create.

So to sum it up; you only ever need to use it if you want to delete/remove a content type from your site.

Just let me know if this explanation was unclear in any way. Thanks for asking.