From 15f29f7d79a6cb0d2f7164e672f0ee318287a72a Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 16 Nov 2023 02:53:22 -0700 Subject: [PATCH 1/2] Update HashtagService, reduce cached_count cache ttl --- app/Services/HashtagService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/HashtagService.php b/app/Services/HashtagService.php index d3cfb274..84fd1986 100644 --- a/app/Services/HashtagService.php +++ b/app/Services/HashtagService.php @@ -29,7 +29,7 @@ class HashtagService public static function count($id) { - return Cache::remember('services:hashtag:public-count:by_id:' . $id, 3600, function() use($id) { + return Cache::remember('services:hashtag:total-count:by_id:' . $id, 300, function() use($id) { $tag = Hashtag::find($id); return $tag ? $tag->cached_count ?? 0 : 0; }); From 051eb962e1471e24d2fb0086cef909ad58edaf3b Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 16 Nov 2023 02:54:30 -0700 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c55aaa8a..77555a5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,7 @@ - Update HashtagService, improve count perf ([3327a008](https://github.com/pixelfed/pixelfed/commit/3327a008)) - Update StatusHashtagService, remove problematic cache layer ([e5401f85](https://github.com/pixelfed/pixelfed/commit/e5401f85)) - Update HomeFeedPipeline, fix tag filtering ([f105f4e8](https://github.com/pixelfed/pixelfed/commit/f105f4e8)) +- Update HashtagService, reduce cached_count cache ttl ([15f29f7d](https://github.com/pixelfed/pixelfed/commit/15f29f7d)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.11.9 (2023-08-21)](https://github.com/pixelfed/pixelfed/compare/v0.11.8...v0.11.9)