Skip to content

Commit

Permalink
Add refresh job in console commands
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Nov 4, 2024
1 parent caf1bab commit 166fd3b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/console/controllers/CacheController.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ public function actionRefresh(): int
public function actionRefreshExpired(): int
{
Blitz::$plugin->refreshCache->refreshExpiredCache();
Blitz::$plugin->refreshCache->refresh();

if (!$this->queue) {
Craft::$app->runAction('queue/run');
Expand All @@ -342,6 +343,7 @@ public function actionRefreshExpired(): int
public function actionRefreshExpiredElements(): int
{
Blitz::$plugin->refreshCache->refreshExpiredElements();
Blitz::$plugin->refreshCache->refresh();

if (!$this->queue) {
Craft::$app->runAction('queue/run');
Expand Down Expand Up @@ -406,6 +408,7 @@ public function actionRefreshUrls(array $urls = []): int
}

Blitz::$plugin->refreshCache->refreshCachedUrls($urls);
Blitz::$plugin->refreshCache->refresh();

if (!$this->queue) {
Craft::$app->runAction('queue/run');
Expand All @@ -428,6 +431,7 @@ public function actionRefreshTagged(array $tags = []): int
}

Blitz::$plugin->refreshCache->refreshCacheTags($tags);
Blitz::$plugin->refreshCache->refresh();

if (!$this->queue) {
Craft::$app->runAction('queue/run');
Expand Down

0 comments on commit 166fd3b

Please sign in to comment.