Skip to content

Commit

Permalink
🐛 Fixed some caching issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Heroyt committed Apr 20, 2024
1 parent 6853365 commit 65d9652
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
4 changes: 1 addition & 3 deletions src/Controllers/NewGame.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use App\Models\MusicMode;
use App\Models\Playlist;
use App\Services\FeatureConfig;
use App\Tools\GameLoading\GameLoader;
use LAC\Modules\Core\ControllerDecoratorInterface;
use Lsr\Core\Controllers\Controller;
use Lsr\Core\Exceptions\ValidationException;
Expand All @@ -35,7 +34,6 @@ class NewGame extends Controller
public function __construct(
Latte $latte,
private readonly FeatureConfig $featureConfig,
private readonly GameLoader $loader,
) {
parent::__construct($latte);
}
Expand All @@ -49,7 +47,7 @@ public function init(RequestInterface $request): void {
bdump($decorators);
foreach ($decorators as $name => $attributes) {
/** @var ControllerDecoratorInterface $decorator */
$this->decorators[] = $decorator = App::getService($name);
$this->decorators[$name] = $decorator = App::getService($name);
$decorator->setController($this)->init();
}
}
Expand Down
10 changes: 3 additions & 7 deletions templates/pages/new-game/index.latte
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,12 @@
{include sectionGameModeVariations}
</section>
{/cache}
{cache 'newGame-'.$lang.'-music', tags: ['templates.newGame', 'templates', 'templates.'.$lang, App\Models\MusicMode::TABLE]}
<section id="music">
{include sectionMusic}
</section>
{/cache}
{*{cache 'newGame-teams', tags: ['templates.newGame', 'templates', 'templates.'.$lang]}*}
<section id="music">
{include sectionMusic}
</section>
<section id="teams-random" class="text-center solo-hide">
{include sectionTeamsRandom}
</section>
{*{/cache}*}
<section id="teams" class="solo-hide">
{include sectionTeams}
</section>
Expand Down

0 comments on commit 65d9652

Please sign in to comment.