mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-16 13:07:46 +02:00
perf(cache): update CI4 to use cache's deleteMatching method
add missing locale to category_options cache name
This commit is contained in:
parent
05ace8cff2
commit
54b84f9684
31 changed files with 483 additions and 557 deletions
|
|
@ -14,7 +14,8 @@ class UserModel extends \Myth\Auth\Models\UserModel
|
|||
|
||||
public function getPodcastContributors($podcastId)
|
||||
{
|
||||
if (!($found = cache("podcast{$podcastId}_contributors"))) {
|
||||
$cacheName = "podcast#{$podcastId}_contributors";
|
||||
if (!($found = cache($cacheName))) {
|
||||
$found = $this->select('users.*, auth_groups.name as podcast_role')
|
||||
->join('podcasts_users', 'podcasts_users.user_id = users.id')
|
||||
->join(
|
||||
|
|
@ -24,7 +25,7 @@ class UserModel extends \Myth\Auth\Models\UserModel
|
|||
->where('podcasts_users.podcast_id', $podcastId)
|
||||
->findAll();
|
||||
|
||||
cache()->save("podcast{$podcastId}_contributors", $found, DECADE);
|
||||
cache()->save($cacheName, $found, DECADE);
|
||||
}
|
||||
|
||||
return $found;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue