Newly added child entries not showing on listing/parent page straight away I am running into an odd issue where creating new child entries does not bust the cache of the parent page(s) that lists them.

This is the structure I am working with:


I am displaying the Course entries on the Course Landing Pages like so:

{% cache using key craft.request.path %}

  {% set currentPage = craft.entries.id(entry.id).first() %}

  {% set entries = craft.entries({
    type: 'course',
    descendantOf: currentPage,
    with: [
      ['courseThumbnail', {
        withTransforms: [
          { mode: 'crop', width: 800, height: 800, position: 'center-center', format: 'jpg' }
        ]
      }]
    ]
  }) %}

  {% for entry in entries %}
      {% include '_includes/_listing-item-course' with { featured : true } %}
  {% endfor %}

{% endcache %}


When I publish a new Course entry, the cache for the parent page(s) is not busted and the new entry will not show unless I move/drag into a new position. This seems to clear the cache and the new entry shows on the parent page(s).

If I change the craft.entries call to not include the descendantOf part, so it looks like this:

 {% set entries = craft.entries({
    type: 'course',
    with: [
      ['courseThumbnail', {
        withTransforms: [
          { mode: 'crop', width: 800, height: 800, position: 'center-center', format: 'jpg' }
        ]
      }]
    ]
  }) %}


Then newly added Course entries will show up straight away on all the Course Landing Pages.

Why is that?
This is a known issue – automatic cache busting currently doesn’t work when the descendantOf param is set to an actual element.

Unfortunately there’s no easy fix on Craft’s end, without a pretty drastic change to how cache busting works. 

As a workaround, you can change your descendantOf param value to currentPage.id rather than just currentPage.