mirror of
https://github.com/go-gitea/gitea
synced 2024-11-01 07:44:25 +00:00
2f725cbc9e
The current default memory cache implementation is unbounded in size and number of objects cached. This is hardly ideal. This PR proposes creating a TwoQueue LRU cache as the underlying cache for Gitea. The cache is limited by the number of objects stored in the cache (rather than size) for simplicity. The default number of objects is 50000 - which is perhaps too small as most of our objects cached are going to be much less than 1kB. It may be worth considering using a different LRU implementation that actively limits sizes or avoids GC - however, this is just a beginning implementation. Signed-off-by: Andrew Thornton <art27@cantab.net> |
||
---|---|---|
.. | ||
cache_redis.go | ||
cache_test.go | ||
cache_twoqueue.go | ||
cache.go |