- More deployer settings are now redacted when generating a diagnostics report.
- The existence of cached files is now checked before deletion, to prevent unnecessarily logged warnings (#741).
- The
injectScriptEvent
variable is no longer defined in the global scope, for better compatibility with JavaScript libraries (#747).
- Fixed a bug that was preventing cache generation when “Do not cache URLs with query strings” was selected (#733).
- Fixed a bug that was preventing cache generation when the “Only Cache Lowercase URIs” setting was enabled.
- Fixed a bug introduced in version 5.9.3 that broke cache generation when “Do not cache URLs with query strings” was selected (#733).
- Fixed a bug in which pages with query strings in their URLs could be cached even when “Do not cache URLs with query strings” was selected (#729).
- Fixed an error that could occur when generating tagged caches in some cases (#728).
- Fixed a bug in which refresh jobs were not being created immediately in some console commands.
- The element sidebar panel is no longer displayed when no storage driver is selected (#718).
- All inject script events are now called on the
document
element except forload
, which is called on thewindow
element (#721).
- Fixed a bug on the Tracked Element Queries page in the Blitz Diagnostics utility (#716).
- Fixed a bug in the Blitz Diagnostics utility that could throw an error if a custom field existed with the handle
displayName
(#723). - Fixed a bug in the Blitz Diagnostics utility when using a Postgres database (#724).
- Added the ability to ignore hints in the Blitz Hints utility (#714).
- CSRF tokens are now only loaded via a script in non-Sprig requests.
- Fixed a bug that was preventing the organic regeneration of expired cached pages.
- Fixed an error that could occur when updating to 5.8.0.
- Added the
onlyCacheLowercaseUris
plugin setting. - Added
enabled
lightswitches to the URI pattern and query string parameter settings.
- The
injectScriptEvent
event is now called on thewindow
element instead ofdocument
. - Increased the batch size used when flushing the entire cache.
- Fixed some styling issues in the Blitz Diagnostics utility.
- Fixed false positives from appearing in the Blitz Hints utility when querying entry authors (#710).
- Fixed a bug in which installing the plugin via the CLI could cause an error (#705).
Warning
This update includes a fix for an issue in which Blitz could send incorrect Cache-Control headers. Please read this article to find out whether the issue affects your site, and what you should do. To ensure the changes in this update are applied, the cache should be refreshed after this update completes.
- Added a check for whether the cache should be refreshed after every request has ended, meaning that setting the
RefreshCacheService::batchMode
property no longer serves a purposes and can be safely removed. - Added compatibility with Craft 5.3.0 for detecting eager-loading opportunities in the Blitz Hints utility.
- The expiry date displayed in the element sidebar panel now reflects the entry’s expiry date, if set and sooner than the cached page’s expiry date (#698).
- The
refreshCacheEnabled
config setting is now actually respected.
- Fixed the default cache control header values that were inadvertently set to incorrect values (learn more).
- Fixed the nested element type count displayed in the Blitz Diagnostics utility.
- Fixed a bug in which the date cached and expiry dates were not being displayed in the correct timezone in the element sidebar panel (#698).
- Fixed a bug in which the homepage was not being displayed as cached in the element sidebar panel.
- Fixed a bug that was causing integrity constraint violation errors to be logged (#699).
- Deprecated the
RefreshCacheService::batchMode
property.
Note
The cache should be cleared or refreshed after this update completes.
- Recreated some database tables to ensure that composite primary keys are correctly created.
- Fixed an exception that could be thrown during database migrations when using MariaDB (#693).
- Fixed a bug that could throw an exception when viewing tracked entries in the Blitz Diagnostics utility when the database tables have a prefix.
- Fixed the dropping of a foreign key in a database migration (#693).
- Fixed a bug that could throw an exception when viewing tracked entries in the Blitz Diagnostics utility when the database tables have a prefix.
Note
For the cache and expiry dates to appear in the new sidebar panel, the cache should be cleared or refreshed after this update completes.
- Added a sidebar panel to element edit pages (#690).
- Added a
dateCached
column to cache records which is output in the sidebar panel and the Blitz Diagnostics utility. - Added the ability to track eager-loaded relation fields nested inside matrix blocks (#657).
- Added a structure view to tracked nested element pages in the Blitz Diagnostics utility.
- The
craft.blitz.csrfInput()
,craft.blitz.csrfParam()
andcraft.blitz.csrfToken()
functions now output inline values rather than inject scripts when called via AJAX requests. - The Commerce integration now only refreshes product variants if their inventory is tracked.
- Nested element types are now differentiated in the Blitz Diagnostics utility.
- Fixed a bug in which the plugin install migration could throw an exception in version 5.5.0 (#688).
Important
To ensure the changes are applied, the cache should be cleared or refreshed after this update completes.
- Added the ability for Blitz to track custom field instances with renamed handles (#682).
- Added the ability to view which tags are being tracked by each page in the Blitz Diagnostics utility.
- Added the ability to view which pages/includes are tracking each element in the Blitz Diagnostics utility.
- The “Served by Blitz” comment is now also output when the cached output is initially created and served.
- Batch mode is now enabled whenever elements are resaved via a queue job.
- Archived and deleted elements are no longer tracked when populated via eager-loaded element queries.
- Criteria defined in eager-loaded element query mappings are now respected when tracking elements.
- Updated links to Craft documentation to use the 5.x version.
- Fixed a bug in which the presence of legacy File Storage settings in project config was throwing errors when upgrading from Blitz 4 (#668).
- Fixed a bug in which the failed site count was not being correctly displayed in the Blitz Diagnostics recommendations.
- Added the ability for element site status changes to be tracked while not refreshing propagating elements (#631).
- Fixed a bug in which the cached page count of sites that contained the paths of other sites could be inaccurately displayed in the Blitz Cache utility.
- Fixed a bug in which the priority of refresh cache and driver jobs was interpreted as
0
when set tonull
(#655). - Fixed an issue in which the priority of batch jobs could be a negative number and therefore jobs would never complete.
- Fixed a bug in which modules that were not bootstrapped were throwing an error when generating a report in the Blitz Diagnostics utility (#668).
- Fixed a bug in which incorrect purge requests were being sent to CloudFront for the homepage (#673).
- Added a tracked fields column to the tracked elements page in the Blitz Diagnostics utility.
- Sites in the Blitz diagnostics report are now sorted by ID in ascending order.
- Fixed a bug in the Git Deployer that was throwing an error when a cached page no longer existed (#664).
- Added anonymised site names to the Blitz diagnostics report.
- Added a detailed breakdown of element types to the Blitz diagnostics report.
- Added the ability to download the Blitz diagnostics report as a markdown file.
- Optimised the refresh cache process by excluding redundantly tracked element queries based on their limit and offset values.
- Fixed the check for whether the
blitz/cache/refresh-expired
console command was executed within the past 24 hours. - Fixed diagnostics notifications in the control panel.
- Fixed the detection of lazy eager-loaded queries.
- Fixed tracking of some element query attributes.
- Added the ability to generate a diagnostics report in the Blitz Diagnostics utility, that can be shared when requesting support.
- Fixed bug in the SQL statement introduced in 5.1.5 when using a Postgres database.
- Improved the deletion of cache records during the refresh cache process to help avoid database memory issues.
The blitz/cache/refresh-cache-tags
and
blitz/cache/refresh-expired-elements
no longer forcibly generate the cache.
- Reverted back to listening for resave and propagate element events.
- Dynamic includes in preview requests are now also sent via AJAX, passing through the token param (#653).
- Fixed a bug in which propagated saves were not triggering refresh cache jobs (#654).
- Fixed a bug in which the Blitz Diagnostic utility could throw an error when viewing tracked includes and when using Postgres (#653).
- Fixed an edge-case bug in which cached includes were not being refreshed when expired in a multi-site setup using subfolders.
- Added tracked includes to the Blitz Diagnostics utility.
- Fixed a bug in which cached includes were not being refreshed when a URL was provided.
- Fixed an edge-case bug in which cached includes were not being refreshed when expired.
- Added compatibility with Craft 5.
- Added suggesting the use of the
eagerly()
function to lazy-loaded element queries in the Blitz Hints utility.
- The Blitz Hints utility is now powered by Sprig, no longer tracks route variable hints and no longer requires an external package.
- Removed the
craft.blitz.getTemplate()
template variable. Usecraft.blitz.includeCached()
orcraft.blitz.includeDynamic()
instead. - Removed the
craft.blitz.getUri()
template variable. Usecraft.blitz.fetchUri()
instead. - Removed the
blitz/templates/get
controller action. - Removed the
cacheElements
config setting. UsetrackElements
instead. - Removed the
cacheElementQueries
config setting. UsetrackElementQueries
instead. - Removed the
craft.blitz.options.cacheElements()
template variable. Usecraft.blitz.options.trackElements()
instead. - Removed the
craft.blitz.options.cacheElementQueries()
template variable. Usecraft.blitz.options.trackElementQueries()
instead. - Removed the
createGzipFiles
setting. - Removed the
createBrotliFiles
setting. - Removed the
BlitzVariable::CACHED_INCLUDE_ACTION
constant. UseCacheRequestService::CACHED_INCLUDE_ACTION
instead. - Removed the
BlitzVariable::DYNAMIC_INCLUDE_ACTION
constant. UseCacheRequestService::DYNAMIC_INCLUDE_ACTION
instead. - Removed the
ElementTypeHelper::LIVE_STATUSES
constant. - Removed the
SettingsModel::clearOnRefresh
method. UseSettingsModel::shouldClearOnRefresh
instead. - Removed the
SettingsModel::expireOnRefresh
method. UseSettingsModel::shouldExpireOnRefresh
instead. - Removed the
SettingsModel::generateOnRefresh
method. UseSettingsModel::shouldGenerateOnRefresh
instead. - Removed the
SettingsModel::purgeAfterRefresh
method. UseSettingsModel::shouldPurgeAfterRefresh
instead. - Removed the
SettingsModel::generatePageBasedOnQueryString
method. UseSettingsModel::shouldGeneratePageBasedOnQueryString
instead. - Removed the
SettingsModel::purgeAssetImages
method. UseSettingsModel::shouldPurgeAssetImages
instead.