make cache resilient
This commit is contained in:
parent
3fbbfa9423
commit
17b5e0a52b
1 changed files with 3 additions and 1 deletions
|
|
@ -86,7 +86,9 @@ function M.get_contest_data(platform, contest_id)
|
|||
contest_id = { contest_id, 'string' },
|
||||
})
|
||||
|
||||
return cache_data[platform][contest_id] or {}
|
||||
cache_data[platform] = cache_data[platform] or {}
|
||||
cache_data[platform][contest_id] = cache_data[platform][contest_id] or {}
|
||||
return cache_data[platform][contest_id]
|
||||
end
|
||||
|
||||
---@param platform string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue