From 170021af8e22e72e12adb7dde992274b0941683e Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Wed, 24 Sep 2025 20:46:43 -0400 Subject: [PATCH] no more ttl --- lua/cp/cache.lua | 7 +------ spec/cache_spec.lua | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lua/cp/cache.lua b/lua/cp/cache.lua index 2c01be5..58bbaf0 100644 --- a/lua/cp/cache.lua +++ b/lua/cp/cache.lua @@ -266,12 +266,7 @@ function M.get_contest_list(platform) return nil end - local contest_list_data = cache_data.contest_lists[platform] - if os.time() >= contest_list_data.expires_at then - return nil - end - - return contest_list_data.contests + return cache_data.contest_lists[platform].contests end ---@param platform string diff --git a/spec/cache_spec.lua b/spec/cache_spec.lua index 2f5053a..50f74a3 100644 --- a/spec/cache_spec.lua +++ b/spec/cache_spec.lua @@ -85,7 +85,6 @@ describe('cp.cache', function() local result = cache.get_contest_data('cses', 'test_contest') assert.is_not_nil(result) - assert.is_not_nil(result.expires_at) end) end)