0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-09-21 16:49:05 +02:00
gitea/modules/cache
Giteabot 54d828f8ec
Increase cacheContextLifetime to reduce false reports (#32011) (#32023)
Backport #32011 by @wolfogre

Replace #32001.

To prevent the context cache from being misused for long-term work
(which would result in using invalid cache without awareness), the
context cache is designed to exist for a maximum of 10 seconds. This
leads to many false reports, especially in the case of slow SQL.

This PR increases it to 5 minutes to reduce false reports.

5 minutes is not a very safe value, as a lot of changes may have
occurred within that time frame. However, as far as I know, there has
not been a case of misuse of context cache discovered so far, so I think
5 minutes should be OK.

Please note that after this PR, if warning logs are found again, it
should get attention, at that time it can be almost 100% certain that it
is a misuse.

Co-authored-by: Jason Song <i@wolfogre.com>
2024-09-11 11:14:40 +08:00
..
cache.go Fix missing memcache import (#31105) (#31109) 2024-05-27 14:23:47 +00:00
cache_redis.go Refactor cache and disable go-chi cache (#30417) 2024-04-13 08:38:44 +00:00
cache_test.go Refactor cache and disable go-chi cache (#30417) 2024-04-13 08:38:44 +00:00
cache_twoqueue.go Refactor cache and disable go-chi cache (#30417) 2024-04-13 08:38:44 +00:00
context.go Increase cacheContextLifetime to reduce false reports (#32011) (#32023) 2024-09-11 11:14:40 +08:00
context_test.go Increase cacheContextLifetime to reduce false reports (#32011) (#32023) 2024-09-11 11:14:40 +08:00
string_cache.go Refactor cache and disable go-chi cache (#30417) 2024-04-13 08:38:44 +00:00