feat(cache): update cache expiration times

- Update the cache expiration time for 'championsListAllCache' and 'championsRolesCache' to 8 hours.
- Update the cache expiration time for 'championShowCache{slug}' to 3 days.
- Update the cache expiration time for 'championSplashColorCache{slug}' to 6 months.
- Update the cache expiration time for 'championSkinShowCache{slug}' to 48 hours.
- Update the cache expiration time for 'championSkinSplashColorCache{slug}' to 120 hours.
This commit is contained in:
Rico van Zelst
2024-01-14 00:13:37 +01:00
parent e3cc331923
commit 5c6f13a072
2 changed files with 11 additions and 11 deletions

View File

@@ -56,14 +56,14 @@ class ChampionSkinController extends Controller
{
$skin = Cache::remember(
'championSkinShowCache' . $championSkin->slug,
60 * 60 * 8,
static fn () => $championSkin->load('champion', 'chromas')
60 * 60 * 48,
static fn() => $championSkin->load('champion', 'chromas')
);
$splashColor = Cache::remember(
'championSkinSplashColorCache' . $championSkin->slug,
60 * 60 * 24,
static fn () => getAverageColorFromImageUrl($championSkin->getSkinImageAttribute())
60 * 60 * 120,
static fn() => getAverageColorFromImageUrl($championSkin->getSkinImageAttribute())
);
$skin->splash_color = $splashColor;