Log in
Model

LayoutPlugin

Magento\PageCache\Model\Layout\LayoutPlugin

What it does

This plugin intercepts Magento's layout rendering to add cache control headers and cache tags for full page caching.

It sets appropriate Cache-Control headers when a page is cacheable and collects cache tags from all blocks to enable proper cache invalidation when content changes.

Developers would encounter this when working with full page cache (FPC) or Varnish implementations.

Public Methods

  • afterGenerateElements()
  • afterGetOutput()