Update Cache_Enabler_Disk::create_cache_file() to validate the page contents again before maybe compressing and then saving the new cache file. This is needed because the page contents can be modified between first checking if they're cacheable and then actually creating the cached file (through a filter, HTML minification, or WebP conversion). This should help prevent Cache Enabler from odd failures or conflicts, such as in https://wordpress.org/support/?p=14373540.
FYI, eventually there will be better return handling here (along with other parts of the code base), allowing Cache Enabler to let users know why the cached file creation failed (which is incredibly rare).
Update
Cache_Enabler_Disk::create_cache_file()
to validate the page contents again before maybe compressing and then saving the new cache file. This is needed because the page contents can be modified between first checking if they're cacheable and then actually creating the cached file (through a filter, HTML minification, or WebP conversion). This should help prevent Cache Enabler from odd failures or conflicts, such as in https://wordpress.org/support/?p=14373540.Add type casts to the following hooks:
cache_enabler_mkdir_mode
cache_enabler_page_contents_after_webp_conversion
cache_enabler_disk_webp_converted_data
(deprecated)cache_enabler_page_contents_before_store
cache_enabler_before_store
(deprecated)FYI, eventually there will be better return handling here (along with other parts of the code base), allowing Cache Enabler to let users know why the cached file creation failed (which is incredibly rare).