1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-10-11 05:30:03 -04:00
gitea/modules
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>
2021-07-10 23:54:15 +02:00
..
analyze
auth
avatar
base
cache Add LRU mem cache implementation (#16226) 2021-07-10 23:54:15 +02:00
charset
context Redirect on bad CSRF instead of presenting bad page (#14937) 2021-07-08 15:57:24 +02:00
convert Introduce NotifySubjectType (#16320) 2021-07-01 12:51:24 +02:00
cron
csv
doctor
emoji
eventsource
generate
git Fix various documentation, user-facing, and source comment typos (#16367) 2021-07-08 13:38:13 +02:00
gitgraph
graceful
hcaptcha
highlight
httpcache
httplib
indexer Fix various documentation, user-facing, and source comment typos (#16367) 2021-07-08 13:38:13 +02:00
lfs Fix various documentation, user-facing, and source comment typos (#16367) 2021-07-08 13:38:13 +02:00
log Fix various documentation, user-facing, and source comment typos (#16367) 2021-07-08 13:38:13 +02:00
markup Update bluemonday to v1.0.15 (#16379) 2021-07-09 03:30:31 +02:00
matchlist
metrics
migrations Fix various documentation, user-facing, and source comment typos (#16367) 2021-07-08 13:38:13 +02:00
nosql
notification Fix various documentation, user-facing, and source comment typos (#16367) 2021-07-08 13:38:13 +02:00
options
password
pprof
private
process
public
queue
recaptcha
references Fix various documentation, user-facing, and source comment typos (#16367) 2021-07-08 13:38:13 +02:00
repofiles Fix various documentation, user-facing, and source comment typos (#16367) 2021-07-08 13:38:13 +02:00
repository Fix various documentation, user-facing, and source comment typos (#16367) 2021-07-08 13:38:13 +02:00
secret Fix various documentation, user-facing, and source comment typos (#16367) 2021-07-08 13:38:13 +02:00
session
setting Add LRU mem cache implementation (#16226) 2021-07-10 23:54:15 +02:00
ssh Prevent zombie processes (#16314) 2021-06-30 22:07:23 +02:00
storage Fix various documentation, user-facing, and source comment typos (#16367) 2021-07-08 13:38:13 +02:00
structs Creating a repo from a template repo via API (#15958) 2021-07-05 17:29:08 +02:00
svg
sync
task Fix various documentation, user-facing, and source comment typos (#16367) 2021-07-08 13:38:13 +02:00
templates Add custom emoji support (#16004) 2021-06-29 16:28:38 +02:00
test
timeutil
translation
typesniffer Fix various documentation, user-facing, and source comment typos (#16367) 2021-07-08 13:38:13 +02:00
upload
uri
user
util Fix various documentation, user-facing, and source comment typos (#16367) 2021-07-08 13:38:13 +02:00
validation Fix various documentation, user-facing, and source comment typos (#16367) 2021-07-08 13:38:13 +02:00
web Add tag protection (#15629) 2021-06-25 16:28:55 +02:00