verbb / navigation

A Craft CMS plugin to create navigation menus for your site.
Other
90 stars 22 forks source link

Blitz cache not clearing when new item is added #389

Closed fernakr closed 5 months ago

fernakr commented 5 months ago

Describe the bug

Blitz cache isn't clearing when new navigation items are added

Steps to reproduce

  1. Use the craft.navigation.nodes tag to render menu items
  2. Use Blitz cache for static caching
  3. Add a new item to the menu
  4. Blitz cache not clearing

Craft CMS version

4.6.0

Plugin version

2.0.24

Multi-site?

No

Additional context

No response

bencroker commented 5 months ago

Blitz should track all executed element queries, including queries for nodes in the Navigation plugin. Look under “Tracked Element Queries” in the Blitz Diagostics utility and you should see one or more element queries of type verbb\navigation\elements\Node. If you don’t see this then perhaps trackElementQueries (or the depracated cacheElementQueries) has been disabled.

Either way, if this is still an issue for you, please create an issue in the Blitz repo.

fernakr commented 5 months ago

Thank you! Just realized the issue was that the cache tags were not placed around the navigation query. Appears to be working now.