public function invalidateCache(): void
{ $this->cache->
deleteItem(self::CACHE_KEY
);
} /**
* @return array<string, list<Script>>
*/
private function load(): array
{ if ($this->debug
) { $this->scriptPersister->
refresh();
} /** @var list<ScriptInfo> $scripts */
$scripts =
$this->connection->
fetchAllAssociative('
SELECT LOWER(HEX(`script`.`app_id`)) as `app_id`,
`script`.`name` AS scriptName,
`script`.`script` AS script,
`script`.`hook` AS hook,
IFNULL(`script`.`updated_at`, `script`.`created_at`) AS lastModified,
`app`.`name` AS appName,
LOWER(HEX(`app`.`integration_id`)) AS integrationId,
`app`.`version` AS appVersion,
`script`.`active` AS active
FROM `script`
LEFT JOIN `app` ON `script`.`app_id` = `app`.`id`
WHERE `script`.`hook` != \'include\'
ORDER BY `app`.`created_at`, `app`.`id`, `script`.`name`
'
);