This commit is contained in:
f4ilji
2025-01-30 00:31:40 +05:00
parent bad611eb84
commit 3385dc5807
60 changed files with 1811 additions and 825 deletions
+6 -2
View File
@@ -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*');
}
/**