Blitz
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.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 toNone
, 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
andactive
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
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 tocompressCachedValues
. - 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 suggestfetchUri
instead offetch
(#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 totrackElements
. - Renamed the
cacheElementQueries
config setting and page specific option totrackElementQueries
. - 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 theENVIRONMENT
environment variable.
Deprecated
- Deprecated the
cacheElements
config setting. UsetrackElements
instead. - Deprecated the
cacheElementQueries
config setting. UsetrackElementQueries
instead. - Deprecated the
craft.blitz.options.cacheElements()
template variable. Usecraft.blitz.options.trackElements()
instead. - Deprecated the
craft.blitz.options.cacheElementQueries()
template variable. Usecraft.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 withcypresslab/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. Usecraft.blitz.includeCached()
orcraft.blitz.includeDynamic()
instead. - Deprecated the
craft.blitz.getUri()
template variable. Usecraft.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.1
July 21, 2022
Fixed
- Fixed an issue with the Local Generator when Twig extensions were being registered via a module (#437).
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
- Added a utility that provides template performance hints, powered by the Blitz Hints package, read the announcement.
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 totrue
, that controls whether the cache should be refreshed when an element is moved within a structure (#289). - Added a new
cacheNonHtmlResponses
config setting, defaulting tofalse
, that allows enabling caching of pages that return non-HTML responses.
Changed
- Replaced all
Warmer
drivers and classes withGenerator
drivers and classes. - Replaced the
Guzzle Warmer
with theHTTP Generator
. - Replaced the
Local Warmer
(experimental) with theLocal 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
andWarm Cache Automatically
settings (use theRefresh Mode
setting instead). - Removed the
Warm Cache Delay
setting on cache purgers. - Removed the
warmCacheDelay
property from theCachePurgerTrait
class. - Removed the
delay
property from theDriverJob
class. - Removed the
delay
parameter from all methods in theCacheWarmerInterface
class.