]> source.dussan.org Git - gitea.git/commit
Fix context cache bug & enable context cache for dashabord commits' authors(#26991...
authorLunny Xiao <xiaolunwen@gmail.com>
Wed, 13 Sep 2023 07:15:00 +0000 (15:15 +0800)
committerGitHub <noreply@github.com>
Wed, 13 Sep 2023 07:15:00 +0000 (15:15 +0800)
commit9df573bddcc01bc8c3ab495629678ad577071831
tree0fa583e6a0d7b7fd1266408e07cd7ff9e6aeb4bf
parentb0a405c5fad2055976747a1c8b2c48dfe2750c9f
Fix context cache bug & enable context cache for dashabord commits' authors(#26991) (#27017)

backport #26991

Unfortunately, when a system setting hasn't been stored in the database,
it cannot be cached.
Meanwhile, this PR also uses context cache for push email avatar display
which should avoid to read user table via email address again and again.

According to my local test, this should reduce dashboard elapsed time
from 150ms -> 80ms .
models/avatars/avatar.go
models/fixtures/system_setting.yml
models/system/setting.go
models/user/avatar.go
modules/repository/commits.go
modules/repository/commits_test.go
modules/templates/helper.go