You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/routers
zeripath 2f725cbc9e
Add LRU mem cache implementation (#16226)
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>
3 years ago
..
api/v1 Fix various documentation, user-facing, and source comment typos (#16367) 3 years ago
common Support custom mime type mapping for text files (#16304) 3 years ago
install just add some unit tests (#16291) 3 years ago
private Add tag protection (#15629) 3 years ago
utils just add some unit tests (#16291) 3 years ago
web Fix source typos (#16374) 3 years ago
init.go Add LRU mem cache implementation (#16226) 3 years ago