From 58b8c7764cc385efe485375f0582af8fbc0178f5 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 6 May 2024 12:09:36 +0200 Subject: [PATCH] improve readability --- src/Support/PowerGridTableCache.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Support/PowerGridTableCache.php b/src/Support/PowerGridTableCache.php index 0b8dc3922..0d3288f2e 100644 --- a/src/Support/PowerGridTableCache.php +++ b/src/Support/PowerGridTableCache.php @@ -7,6 +7,8 @@ final class PowerGridTableCache { + public const THREE_HOURS = 60 * 60 * 3; + private static function list(): Collection { $cachedTableTags = rescue(fn () => Cache::get('pg_cached_tables')) ?? ''; @@ -23,7 +25,7 @@ public static function put(string $modelTable, array $tableColumns): array return (array) Cache::remember( $tag, - 60 * 60 * 3, + self::THREE_HOURS, fn () => $tableColumns ); }