Changes
This commit is contained in:
@@ -18,14 +18,18 @@ class PostCacheService extends AbstractCacheService implements CacheInterface
|
||||
$cacheKeyBySlug = md5($entity->slug);
|
||||
$cacheKeyById = md5($entity->id);
|
||||
|
||||
Cache::forget($cacheKeyBySlug);
|
||||
Cache::forget($cacheKeyById);
|
||||
Cache::forget('post_' .$cacheKeyBySlug);
|
||||
Cache::forget('post_' .$cacheKeyById);
|
||||
|
||||
$this->clearCacheByPrefix('recent_posts*');
|
||||
|
||||
}
|
||||
|
||||
public function clearAllCacheByModel(): void
|
||||
{
|
||||
$this->clearCacheByPrefix('post_*');
|
||||
$this->clearCacheByPrefix('posts_*');
|
||||
$this->clearCacheByPrefix('recent_posts*');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user