mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-14 03:57:45 +02:00
fix(cache): suffix cache names with authenticated for credits, map and pages
This commit is contained in:
parent
18ae557e97
commit
418a70b2a6
13 changed files with 48 additions and 33 deletions
|
|
@ -37,9 +37,17 @@ class PageController extends BaseController
|
|||
|
||||
public function index(): string
|
||||
{
|
||||
$locale = service('request')
|
||||
->getLocale();
|
||||
$cacheName = "page-{$this->page->slug}-{$locale}";
|
||||
$cacheName = implode(
|
||||
'_',
|
||||
array_filter([
|
||||
'page',
|
||||
$this->page->slug,
|
||||
service('request')
|
||||
->getLocale(),
|
||||
can_user_interact() ? 'authenticated' : null,
|
||||
]),
|
||||
);
|
||||
|
||||
if (! ($found = cache($cacheName))) {
|
||||
$data = [
|
||||
'metatags' => get_page_metatags($this->page),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue