Version 4.14.1

March 25, 2024

Changed

  • Cached and dynamic includes are now resolved as regular includes when previewing an element (#646).

Fixed

  • Fixed an error that could be thrown when returning to a page via the breadcrumbs in the Blitz Diagnostics utility (#645).

Version 4.14.0

March 20, 2024

Added

  • Added batched generate cache jobs (#537).
  • Added a new driverJobBatchSize config setting that sets the batch size to use for driver jobs that support batching.
  • Added a new refreshCacheEnabled config setting that determines whether cached pages are refreshed whenever content changes or an integration triggers it.
  • Added a new injectScriptPosition config setting that determines the position in the HTML in which to output the injected script (#636).
  • Added a verbose output mode to blitz/cache console commands that can be activated by adding a --verbose flag (#642).
  • Added a default timeout of 60 seconds to the Local Generator.

Changed

  • Campaign now requires Craft CMS 4.4.0 or later.
  • The Local Generator now uses the bootstrap.php file in the project root, if it exists.
  • The Local Generator now sets the server port according to the HTTP protocol.
  • Changed the default timeout of the HTTP Generator to 60 seconds.

Fixed

  • Fixed an SQL error that could occur when too many site URIs were being expired at once during the refresh cache process (#639).
  • Fixed minor bugs and typos in the recommendations provided in the Blitz Diagnostics utility (#641).

Deprecated

  • Deprecated the SettingsModel::clearOnRefresh method. Use SettingsModel::shouldClearOnRefresh instead.
  • Deprecated the SettingsModel::expireOnRefresh method. Use SettingsModel::shouldExpireOnRefresh instead.
  • Deprecated the SettingsModel::generateOnRefresh method. Use SettingsModel::shouldGenerateOnRefresh instead.
  • Deprecated the SettingsModel::purgeAfterRefresh method. Use SettingsModel::shouldPurgeAfterRefresh instead.
  • Deprecated the SettingsModel::generatePageBasedOnQueryString method. Use SettingsModel::shouldGeneratePageBasedOnQueryString instead.
  • Deprecated the SettingsModel::purgeAssetImages method. Use SettingsModel::shouldPurgeAssetImages instead.

Version 4.13.1

March 12, 2024

Changed

  • The template stack trace in the Blitz Hints utility is now updated if different for the same field-template combination.

Fixed

  • Fixed a bug in the Blitz Hints utility that could throw an error when conditional variables were used in an extends tag (#632).

Version 4.13.0

March 11, 2024

Added

  • Added a template stack trace to the Blitz Hints utility.

Changed

  • Elements that are propagating are no longer ignored from the cache refresh process (#631).
  • Changed the default branch in the Git Deployer to main.

Version 4.12.3

March 8, 2024

Fixed

  • Fixed a bug in which blank rows were appearing in the Blitz Diagnostics utility.

Version 4.12.2

March 5, 2024

Added

  • Added tracked tags to the Blitz Diagnostics utility.

Changed

  • Diagnostics warnings are now listed before recommendations that pass.
  • A custom log target is now only registered if a dispatcher exists.

Version 4.12.1

February 27, 2024

Fixed

  • Fixed a bug introduced in version 4.12.0 in which the Blitz inject script was not being registered.

Version 4.12.0

February 27, 2024

Polyfills for IE have been removed from the Blitz inject script. If you need to support IE, you will need to add the polyfills yourself.

Added

  • Added a new excludedTrackedElementQueryParams config setting that can be used to exclude params when storing tracked element queries.

Changed

  • Reverted deleting expired URIs from the database immediately when refreshing expired cache, as it could cause cached pages not to be refreshed (#624).
  • Tracked element queries that have invalid params or that cannot be executed are now deleted when refreshing the cache.
  • Tracked entry queries can now determine source IDs from a structure ID.
  • Optimised the params that are stored on tracked element queries.
  • Made the ordering of items displayed in the Blitz Diagnostics utility deterministic.

Removed

  • Removed the fetch, Promise and CustomEvent polyfills for IE from the Blitz inject script, as they were pulling from polyfill.io. If you need to support IE, you will need to add the polyfills to your templates yourself.

Version 4.11.2

February 19, 2024

Changed

  • Asset queries containing filenames are no longer tracked.

Fixed

  • Fixed a bug in the diagnostics utility that only affected Postgres (#621).

Version 4.11.1

February 12, 2024

Fixed

  • Fixed the tracking of non-cacheable block elements when eager-loaded.

Version 4.11.0

February 12, 2024

Added

  • Added recommendations to the Blitz Diagnostics utility.
  • Added the user that runs controller actions to log messages.
  • Added an expiry date column to pages and elements in the Blitz Diagnostics utility (#615).
  • Added a wrapperClass property to the VariableConfigModel class (#620).
  • Added new console commands for clearing, generating and purging the cache: blitz/cache/clear-site, blitz/cache/clear-tagged, blitz/cache/clear-urls, blitz/cache/generate-site, blitz/cache/generate-tagged, blitz/cache/generate-urls, blitz/cache/purge-site, blitz/cache/purge-tagged, blitz/cache/purge-urls.

Changed

  • The Cache Folder Path column now displays aliases in the cached file table in the File Storage utility.
  • Entry queries for “single” sections are no longer tracked.
  • Improved error handling in a previous migration.
  • Made minor optimisations to the file storage driver.
  • Expired URIs are now deleted from the database immediately when refreshing expired cache.
  • Invalid element query params no longer throw an error when applied (#579).

Fixed

  • Fixed a bug in which line breaks were not being replaced with spaces in raw SQL query output in the Blitz Diagnostics utility (#611).

Version 4.10.3

January 13, 2024

Fixed

  • Fixed more Postgres errors.

Version 4.10.2

January 12, 2024

Fixed

  • Fixed Postgres errors introduced in 4.10.0 (#605).

Version 4.10.1

January 10, 2024

Fixed

  • Fixed a bug in which SQL queries were executed in the Blitz Diagnostics utility that required minimum database versions above those required by Craft 4 (#602).
  • Fixed a bug in which paginated pages could go beyond their maximum in the Blitz Diagnostics utility (#603).
  • Fixed a bug in which Sprig Core was not being bootstrapped for all CP requests.
  • Fixed a bug in which legacy non-cacheable element types were causing errors in the Blitz Diagnostics utility.

Version 4.10.0

January 9, 2024

Added

Fixed

  • Fixed a bug in which all cached pages were being marked as expired when no cacheable site URIs were refreshed (#598).

Version 4.9.4

December 19, 2023

Changed

  • The path param is now removed from query strings before being cached.
  • Slashes in cached include URLs are no longer decoded (#595).

Fixed

  • Fixed a bug that could cause an error when an element’s ID is unset (#594).

Version 4.9.3

November 28, 2023

Changed

  • Send site URIs to the EVENT_AFTER_REFRESH_ALL_CACHE event if cache generation is enabled.

Version 4.9.2

November 28, 2023

Changed

  • Integrity constraint violation exceptions are now caught when batch inserting rows into the database (#588).
  • Reverted sending site URIs to the refresh cache event (#590).

Fixed

  • Fixed a bug in which eager-loading custom fields of preloaded singles was not being tracked on cached pages (#585).

Version 4.9.1

November 20, 2023

Added

  • Added a ssiTagFormat config setting that allows defining the format of SSI tags (#558).
  • Added a detectSsiEnabled config setting that determines whether Blitz should detect whether SSI is enabled on the web server (#575).

Version 4.9.0

November 17, 2023

Added

  • Added the ability to configure a custom queue component via config/app.php to use when running queue jobs (#577).

Fixed

  • Fixed a bug in which previewing a disabled site could throw an exception with the File Cache Storage selected (#581).

Version 4.8.0

November 14, 2023

Added

  • Added a new ExpireCacheService class that handles marking cache as expired when the refresh mode is set to expire the cache.
  • Added a new cacheControlHeaderExpired config setting that reduces the max cache age in public reverse proxies to 5 seconds by default for expired pages.
  • Added a new defaultCacheControlHeader config setting that is sent by default if no other cache headers are sent (#580).

Changed

  • Cache control headers are now set to the new cacheControlHeaderExpired config setting when a cached response is sent for an expired page, meaning that expired cache can now be organically regenerated.
  • Cached pages are now expired when refreshed via the utility or console commands and when the refresh mode is set to expire the cache.

Version 4.7.1

November 3, 2023

Changed

  • Bumped the required version of the Blitz Hints package.

Fixed

  • Fixed a potential issue with detecting whether SSI is enabled on the web server from the control panel.
  • Fixed a bug in which generating the cache could throw an exception if no custom site URLs were added in the settings (#578).

Version 4.7.0

October 26, 2023

Added

  • Added a DummyStorage class that allows the cache storage driver to be set to None, useful if pages should be cached on a reverse proxy only (#502).

Changed

  • Refreshing expired cached now forcibly generates new cached pages if they are not cleared (#571).
  • Changed the refreshable status check to always consider elements with live and active statuses as refreshable (#572).

Fixed

  • Fixed a bug in which the cached include path could be incorrectly set if specific included query string parameters were selected (#573).
  • Fixed a bug in which saving included and excluded query string parameters was not possible were no values were specified.

Version 4.6.0

October 17, 2023

Added

  • Added the ability for Blitz to track disabled elements in relation field queries so that cached pages are refreshed when their status is set to enabled (#555).

Changed

  • Changed the dynamic include path to account for sites that live within a subfolder (#562).
  • Include action tags now ensure that slashes are not encoded to account for URL encoding issues (#564).

Version 4.5.5

September 20, 2023

Fixed

  • Fixed a potential security issue.

Version 4.5.4

September 15, 2023

Fixed

  • Fixed a bug in which element query params containing multi and single option data were not being converted to values.
  • Fixed a bug in which error exceptions were not being caught when produced by cached element queries during the refresh cache process.

Version 4.5.3

September 12, 2023

Fixed

  • Fixed a bug in which cached pages were not being cleared when using the Yii Cache Storage driver with gzip compression enabled.

Version 4.5.2

August 14, 2023

Fixed

  • Fixed a bug in which tracked element queries were ignoring disabled elements when determining which cached pages to refresh (#527).

Version 4.5.1

August 9, 2023

Fixed

  • Fixed a bug in which using dynamic includes with nginx server rewrites set to cache pages with query strings as the same page could incorrectly include the home page.

Version 4.5.0

July 19, 2023

The cache must be cleared or refreshed after this update completes.

Added

  • Added the ability to send compressed responses to browsers that accept supported encodings.
  • Added the ability to save compressed cached values in the Yii Cache Storage to help reduce the memory required.
  • Added tips that display whether gzip is enabled on the web server in the Cache Storage settings.
  • Added the maxUriLength config setting (#539).

Changed

  • Cached includes and pages that contain SSI or ESI includes are now never compressed.
  • Renamed the createGzipFiles setting to compressCachedValues.
  • Improved the performance of cache refresh jobs by optimising database queries (#496).
  • The cache refresh process is now triggered when an asset’s file is replaced or its filename is changed (#514).
  • Changed the URL that checks whether SSI is enabled on the web server to a relative URL.

Removed

  • Removed the ability to create Brotli files and removed the setting (use gzip instead).

Fixed

  • Fixed a bug in which the cacheDuration config setting was not being applied when the value was not an integer (#536).
  • Fixed a bug in which the __home__ URI was not responding with a 404 error when it should have (#538).
  • Fixed a bug in which eager-loading of auto-injected elements was not being tracked on cached pages.

Deprecated

  • Deprecated the createGzipFiles setting.
  • Deprecated the createBrotliFiles setting.

Version 4.4.7

July 17, 2023

Changed

  • Hardened checks against null responses to help avoid errors (#519).

Fixed

  • Fixed a bug in which refreshing the cache could fail when using the Redis queue driver (#522).
  • Fixed a bug in which URLs containing the control panel trigger were not being cached (#532).
  • Fixed a bug in which a validation error could occur when an invalid email address was entered in the Cloudflare API Key Email field even when the authentication method was set to API Token.
  • Fixed a race condition that could result in an SQL error if the database used read/write splitting (#531).
  • Fixed the getUri deprecation notice to suggest fetchUri instead of fetch (#508, #524).

Version 4.4.6

June 28, 2023

To ensure the fix is applied, the cache should be cleared or refreshed after this update completes.

Fixed

  • Fixed a bug introduced in 4.4.5 in which eager-loaded related elements were not being tracked on cached pages (#514).

Version 4.4.5

May 25, 2023

To ensure the fix is applied, the cache should be cleared or refreshed after this update completes.

Fixed

  • Fixed a bug in which eager-loaded custom fields were not being tracked on cached pages (#507).

Version 4.4.4

March 27, 2023

Fixed

  • Fixed a bug in which uninstalling the plugin could throw an error (#490).

Version 4.4.3

March 14, 2023

Fixed

  • Fixed a bug in which cached pages were not being deleted for disabled elements or error pages with the “Expire the cache and regenerate in a queue job” refresh mode selected (#483).

Version 4.4.2

March 9, 2023

Fixed

  • Fixed a bug in which the wrong instance of StringHelper was being used (#481).

Version 4.4.1

March 7, 2023

Fixed

  • Fixed the generatePageBasedOnQueryString check and ensured that cached includes are always allowed.
  • Fixed usage of the Html::svg() method, which was only added in Craft 4.3.0 (#480).

Version 4.4.0

March 1, 2023

Tracking of attributes and custom fields takes place when pages are cached, therefore it is important to clear or refresh the cache after this update completes.

Added

  • Added detection of which attributes and custom fields are changed on each element save.
  • Added tracking of which custom fields are output per element per page, greatly reducing the number of cached pages that must be invalidated when content changes (#465).
  • Added tracking of which attributes and custom fields are used by each element query, greatly reducing the number of element queries that must be executed during the cache refresh process (#466).
  • Added purging of asset image URLs and existing image transforms when image dimensions or focal points are changed.
  • Added a purgeAssetImagesWhenChanged config setting that determines whether asset images should be purged when changed.
  • Added a tip about excluding the cache folder path from search engine indexing to the Blitz File Storage settings.

Changed

  • Cookies are now removed from cached responses as they can prevent edge-side caching.
  • Renamed the cacheElements config setting and page specific option to trackElements.
  • Renamed the cacheElementQueries config setting and page specific option to trackElementQueries.
  • Reverted the removal of the generatePagesWithQueryStringParams config setting.
  • Cached pages are now generated in a more deterministic order, by URI ascending.
  • The Local Generator now catches context panic errors (#476).

Fixed

  • Fixed the rewrite.php file not detecting the ENVIRONMENT environment variable.

Deprecated

  • Deprecated the cacheElements config setting. Use trackElements instead.
  • Deprecated the cacheElementQueries config setting. Use trackElementQueries instead.
  • Deprecated the craft.blitz.options.cacheElements() template variable. Use craft.blitz.options.trackElements() instead.
  • Deprecated the craft.blitz.options.cacheElementQueries() template variable. Use craft.blitz.options.trackElementQueries() instead.

Version 4.3.3

February 14, 2023

Changed

  • The SSI Enabled tip now also displays whether Server-Side Includes (SSI) are not enabled on the web server.

Version 4.3.2

February 13, 2023

Added

  • Added a tip to the SSI Enabled setting that appears if Server-Side Includes (SSI) are enabled on the web server.

Version 4.3.1

February 10, 2023

Fixed

  • Fixed a bug in which saving elements without going through a draft were not triggering cache refreshes (#474).

Version 4.3.0

February 7, 2023

Added

  • Added a Blitz Cache dashboard widget with actions to refresh specific pages, sites or the entire cache.
  • Added a rewrite.php file that can be used in situations where a server rewrite is not possible.
  • Added the craft.blitz.includeCached() template variable, that includes a cached template using SSI or ESI if enabled, otherwise via an AJAX request.
  • Added the craft.blitz.includeDynamic() template variable, that includes a dynamically rendered template via an AJAX request.
  • Added the craft.blitz.fetchUri() template variable, that fetches a URI via an AJAX request. Whether the URI response is cached or not is determined by the URI patterns in the plugin settings.
  • Added a SSI Enabled setting that enables Blitz to include templates using Server-Side Includes (SSI), which must be enabled on the web server.
  • Added a ESI Enabled setting that enables Blitz to include templates using Edge-Side Includes (ESI), which must be enabled on the web server or reverse proxy (CDN).
  • Added a “Cached Includes” column to the Blitz cache utility for the File Cache Storage driver.
  • Added a timeout config setting to the HTTP Generator (#467).

Changed

  • Improved the detection of when elements should be refreshed based on changes.
  • Improved the performance of refresh job requests when cache generation is disabled (#456).
  • Generator, deployer and purger jobs are now released before refreshing the entire cache, provided cache clearing is enabled (#454).
  • Changed the default authentication method for the Cloudflare purger to “API token” and improved the field instruction text.
  • Replaced the abandoned symplify/git-wrapper package with cypresslab/gitelephant.
  • Increased the default timeout of HTTP Generator requests to 120 seconds (#467).

Fixed

  • Fixed a bug in which the “Served by Blitz” comment was not respecting the page specific options in the first request (#459).
  • Fixed a bug in which the Blitz Cache utility could throw an error if the cacheStorageSettings['countCachedFiles'] config setting was disabled.
  • Fixed a bug in which calling hasSales() on a Commerce variant query could throw an error (#471).

Deprecated

  • Deprecated the craft.blitz.getTemplate() template variable. Use craft.blitz.includeCached() or craft.blitz.includeDynamic() instead.
  • Deprecated the craft.blitz.getUri() template variable. Use craft.blitz.fetchUri() instead.
  • Deprecated the blitz/templates/get controller action.

Version 4.2.3

October 19, 2022

Fixed

  • Fixed a bug in which one-time use tokens would not work with Blitz enabled (#448).

Version 4.2.2

September 26, 2022

Changed

  • The Local Generator now continues generating pages, rather than failing, even when Twig template errors are encountered (#444).
  • The Git Deployer now only appends /index.html to site URIs with HTML mime types (#443).

Version 4.2.1

July 21, 2022

Fixed

  • Fixed an issue with the Local Generator when Twig extensions were being registered via a module (#437).

Version 4.2.0

July 5, 2022

Added

  • Added a Commerce plugin integration that refreshes variants on order completion so that their stock is updated (#432).

Changed

  • The cache is now refreshed when the focal point of an asset is changed (#431).

Version 4.1.4

June 21, 2022

Changed

  • Exceptions are caught and logged, rather than being thrown, during cache generation using the HTTP Generator (#418).

Fixed

  • Fixed an issue in which expiry dates were not being added or updated for pending entries (#422).

Version 4.1.3

May 23, 2022

Fixed

  • Fixed issues with Apache server rewrites that could prevent pages from being cached (#411).

Version 4.1.2

May 17, 2022

Added

  • Added the Blitz Hints announcement to the dashboard.

Version 4.1.1

May 16, 2022

Changed

  • Bumped the required version of the Blitz Hints package.

Version 4.1.0

May 16, 2022

Added

Fixed

  • Fixed the Local Generator bootstrap process for older Craft installations (#404).

Version 4.0.3

May 6, 2022

Fixed

  • Fixed a bug in a migration when no cache purger settings existed (#402).

Version 4.0.2

May 5, 2022

Fixed

  • Fixed a bug in a migration when no cache purger settings existed (#402).

Version 4.0.1

May 5, 2022

Fixed

  • Fixed a bug in the purge console command.
  • Fixed a bug in the custom log target.

Version 4.0.0

May 4, 2022

Cache warmers have been completely replaced by cache generators. The included/excluded query string parameters config setting format has changed. See the new formats here.

Added

  • Added compatibility with Craft 4.
  • Added a new Refresh Mode setting that determines when and how the cache should be refreshed.
  • Added the concept of cache generation, that supersedes cache warming, and is used both for generating, regenerating and in some cases removing cached pages.
  • Added the ability to revalidate cached pages that have expired when serving cached responses (#381).
  • Added the included/excluded query string parameter settings to the Advanced Settings tab and added the ability for them to be site-specific.
  • Added the ability for cache purgers to be run in queue jobs.
  • Added a new refreshCacheWhenElementMovedInStructure config setting, defaulting to true, that controls whether the cache should be refreshed when an element is moved within a structure (#289).
  • Added a new cacheNonHtmlResponses config setting, defaulting to false, that allows enabling caching of pages that return non-HTML responses.

Changed

  • Replaced all Warmer drivers and classes with Generator drivers and classes.
  • Replaced the Guzzle Warmer with the HTTP Generator.
  • Replaced the Local Warmer (experimental) with the Local Generator (stable).
  • Replaced the Log To File helper package with a custom Monolog log target.
  • Changed the included/excluded query string parameters config setting format, see the new format here.

Removed

  • Removed the Clear Cache Automatically and Warm Cache Automatically settings (use the Refresh Mode setting instead).
  • Removed the Warm Cache Delay setting on cache purgers.
  • Removed the warmCacheDelay property from the CachePurgerTrait class.
  • Removed the delay property from the DriverJob class.
  • Removed the delay parameter from all methods in the CacheWarmerInterface class.