Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 6 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
ManagementCacheRebuildLogic | |
0.00% |
0 / 6 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
validateImpl | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
executeImpl | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace PeServer\App\Models\Domain\Page\Management; |
6 | |
7 | use PeServer\App\Models\AppDatabaseCache; |
8 | use PeServer\App\Models\Domain\Page\PageLogicBase; |
9 | use PeServer\Core\Mvc\LogicCallMode; |
10 | use PeServer\Core\Mvc\LogicParameter; |
11 | use PeServer\Core\Stopwatch; |
12 | |
13 | class ManagementCacheRebuildLogic extends PageLogicBase |
14 | { |
15 | public function __construct(LogicParameter $parameter, private AppDatabaseCache $dbCache) |
16 | { |
17 | parent::__construct($parameter); |
18 | } |
19 | |
20 | protected function validateImpl(LogicCallMode $callMode): void |
21 | { |
22 | //NOP |
23 | } |
24 | |
25 | protected function executeImpl(LogicCallMode $callMode): void |
26 | { |
27 | $stopwatch = Stopwatch::startNew(); |
28 | |
29 | $this->dbCache->exportAll(); |
30 | |
31 | $stopwatch->stop(); |
32 | |
33 | $this->addTemporaryMessage('キャッシュ再構築完了: ' . $stopwatch->toString()); |
34 | } |
35 | } |