Skip to content

Commit

Permalink
rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
nivv committed May 31, 2024
1 parent 0aed198 commit f2141ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Models/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ class Menu extends Model
protected static function booted()
{
static::saved(function ($menu) {
$tagsToFlush = (new CacheBuster)->getCacheTags($menu, ['fabriq_menu_'.$menu->slug]);
(new BustCacheWithWebhook)->handle($tagsToFlush);
$tagsToFlush = (new CacheBuster)->getCacheKeys($menu, ['fabriq_menu_'.$menu->slug]);
(new BustCacheWithWebhook)->handle($tagsToFlush->toArray());
});

static::deleted(function ($menu) {
$tagsToFlush = (new CacheBuster)->getCacheTags($menu, ['fabriq_menu_'.$menu->slug]);
(new BustCacheWithWebhook)->handle($tagsToFlush);
$tagsToFlush = (new CacheBuster)->getCacheKeys($menu, ['fabriq_menu_'.$menu->slug]);
(new BustCacheWithWebhook)->handle($tagsToFlush->toArray());
});
}

Expand Down

0 comments on commit f2141ff

Please sign in to comment.