Release 1.18.0
Added environment helpers, cache management and benchmarking features with various filters and actions for customization.
View full changelog
Added
- Added Environment helpers (
Helpers\Environment) - determine environment (local, staging, production) - Added
CacheManagerutility class for working with cache - Added
Cacheabletrait to easily access globalCacheManagerinstance - Added filter
airfleet/cache/enabledto enable/disable cache - Added filter
airfleet/cache/expirationto set cache duration in seconds (0 to not expire) - Added filter
airfleet/cache/cache_dir_checksto enable/disable caching directory modification checks - Added filter
airfleet/cache/expiration_dir_checkto set cache duration for directory modification checks in seconds (0 to not expire) - Added filter
airfleet/cache/managerto set cache manager - Added action
airfleet/cache/flushto clear the cache - Added action
airfleet/cache/hitthat is triggered whenever cache is hit, but only if WP_DEBUG is enabled - Added action
airfleet/cache/missthat is triggered whenever there is a cache miss, but only if WP_DEBUG is enabled - Added class
Benchmarkto setup benchmarking feature. When enabled, an HTML comment will be printed at the end of the page with the amount of time in milliseconds it took to run certain features. The comment is only displayed for authenticated users. - Added filter
airfleet/benchmark/enabledto enable/disable performance benchmark - Added filter
airfleet/benchmark/log_to_error_logto enable/disable logging benchmark results to the error log. This is in addition to the HTML comment and dependent on benchmarking being enabled - Added action
airfleet/benchmark/startto start tracking a workload benchmark (must pass ID) - Added action
airfleet/benchmark/stopto stop tracking a workload benchmark (must pass ID) - Added utility classes
TimerandNestedTimerRegistryused for benchmarking
Changed
LocalJsonLoadFromCache: Refactored to useCacheableand improve cache invalidation when ACF Local JSON directory contents changeLocalJsonCacheSettings: Automatically set default value for filterairfleet/cache/enabledbased on environment (enabled for all except local)- Renamed filter
airfleet/framework/acf/local_json_cache/enabledtoairfleet/acf/local_json_cache/enabled - Renamed filter
airfleet/framework/acf/local_json_cache/expirationtoairfleet/acf/local_json_cache/expiration - Renamed action
airfleet/framework/acf/local_json_cache/invalidatetoairfleet/acf/local_json_cache/invalidate