summaryrefslogtreecommitdiffstats
path: root/modules/cache/cache_twoqueue.go
Commit message (Collapse)AuthorAgeFilesLines
* Refactor cache and disable go-chi cache (#30417)wxiaoguang2024-04-131-1/+1
| | | use built-in cache package to wrap external go-chi cache package
* Upgrade go dependencies (#25819)harryzcy2023-07-141-6/+6
|
* Replace `interface{}` with `any` (#25686)silverwind2023-07-041-4/+4
| | | | | Result of running `perl -p -i -e 's#interface\{\}#any#g' **/*` and `make fmt`. Basically the same [as golang did](https://github.com/golang/go/commit/2580d0e08d5e9f979b943758d3c49877fb2324cb).
* Implement FSFE REUSE for golang files (#21840)flynnnnnnnnnn2022-11-271-2/+1
| | | | | | | | | Change all license headers to comply with REUSE specification. Fix #16132 Co-authored-by: flynnnnnnnnnn <flynnnnnnnnnn@github> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Update go-chi/cache to utilize Ping() (#19719)65432022-05-151-0/+5
| | | | | | | * update gitea.com/go-chi/cache -> v0.2.0 * ajust to new interface * refactor
* Add an abstract json layout to make it's easier to change json library (#16528)Lunny Xiao2021-07-241-2/+2
| | | | | | | | | | | * Add an abstract json layout to make it's easier to change json library * Fix import * Fix import sequence * Fix blank lines * Fix blank lines
* Add LRU mem cache implementation (#16226)zeripath2021-07-101-0/+204
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>