From 17790f0de1860b74287e922aee29a4a344e7455e Mon Sep 17 00:00:00 2001 From: Max Korlaar Date: Sun, 22 Sep 2024 17:18:29 +0100 Subject: [PATCH] Keep last 20 players/guilds, ideally this should become a rolling average --- app/Console/Commands/ClearRecentlyViewed.php | 6 +++--- resources/data/skyblock/SkyCrypt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Console/Commands/ClearRecentlyViewed.php b/app/Console/Commands/ClearRecentlyViewed.php index adfa116..c4b8d79 100644 --- a/app/Console/Commands/ClearRecentlyViewed.php +++ b/app/Console/Commands/ClearRecentlyViewed.php @@ -65,21 +65,21 @@ public function handle(): void { $this->info('recent_friends size: ' . $recentFriendsCount); - Redis::connection('cache')->zPopMin('recent_friends', max(0, $recentFriendsCount - 10)); + Redis::connection('cache')->zPopMin('recent_friends', max(0, $recentFriendsCount - 20)); Redis::connection('cache')->expire('recent_friends', config('cache.times.recent_players')); $recentGuildsCount = Redis::connection('cache')->zCount('recent_guilds', '-inf', '+inf'); $this->info('recent_guilds size: ' . $recentGuildsCount); - Redis::connection('cache')->zPopMin('recent_guilds', max(0, $recentGuildsCount - 10)); + Redis::connection('cache')->zPopMin('recent_guilds', max(0, $recentGuildsCount - 20)); Redis::connection('cache')->expire('recent_guilds', config('cache.times.recent_guilds')); $recentOnlinePlayersCount = Redis::connection('cache')->zCount('recent_online_players', '-inf', '+inf'); $this->info('recent_online_players size: ' . $recentOnlinePlayersCount); - Redis::connection('cache')->zPopMin('recent_online_players', max(0, $recentOnlinePlayersCount - 10)); + Redis::connection('cache')->zPopMin('recent_online_players', max(0, $recentOnlinePlayersCount - 20)); Redis::connection('cache')->expire('recent_online_players', config('cache.times.recent_players')); foreach (config('recents.blocklist.players') as $uuid) { diff --git a/resources/data/skyblock/SkyCrypt b/resources/data/skyblock/SkyCrypt index d1b122d..89bd6bd 160000 --- a/resources/data/skyblock/SkyCrypt +++ b/resources/data/skyblock/SkyCrypt @@ -1 +1 @@ -Subproject commit d1b122d850779fd6df934e1399383fe892e786b7 +Subproject commit 89bd6bd2344602b4ea7de5d99d3db5a828756be9