Home > Back-end >  How to exclude a site from caching in Shopware 6?
How to exclude a site from caching in Shopware 6?

Time:09-13

I have a simple plugin which enables password protection for pages specified by custom fields. The custom field is being checked by a subscriber subscribing to GenericPageLoadedEvent.

What I found out is, the event is not being triggered as soon as the page is cached.

Is there any way to prevent the page from being cached? Is there another way to trigger the event? Should I check the page for password on a different way?

CodePudding user response:

You could additionally listen to the HttpCacheHitEvent to react to the successful lookup of cached pages.

  • Related