diff --git a/CHANGELOG.md b/CHANGELOG.md index ff46c4b..5cd5c66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.0.2] - 2024-09-09 + +### Changed + +- Stopped caching empty API responses. + ## [0.0.1] - 2024-09-09 ### Added diff --git a/items.php b/items.php index 9946d05..9c29bd7 100644 --- a/items.php +++ b/items.php @@ -28,7 +28,10 @@ 'saved' => $now, ]; - $workflow->cache()->writeJson($data); + if (! empty($data->servers) || ! empty($data->projects)) { + // Only cache non-empty responses + $workflow->cache()->writeJson($data); + } } else { $workflow->logger()->info('Using cached data...'); }