mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-11 02:36:42 +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
|
|
@ -17,9 +17,17 @@ class MapController extends BaseController
|
|||
{
|
||||
public function index(): string
|
||||
{
|
||||
$locale = service('request')
|
||||
->getLocale();
|
||||
$cacheName = "page_map_{$locale}";
|
||||
$cacheName = implode(
|
||||
'_',
|
||||
array_filter([
|
||||
'page',
|
||||
'map',
|
||||
service('request')
|
||||
->getLocale(),
|
||||
can_user_interact() ? 'authenticated' : null,
|
||||
]),
|
||||
);
|
||||
|
||||
if (! ($found = cache($cacheName))) {
|
||||
$found = view('pages/map', [], [
|
||||
'cache' => DECADE,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue