1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-10-10 19:32:04 +00:00
Commit graph

4 commits

Author SHA1 Message Date
Earl Warren
5f0b036e34
chore: cache: move findCacheWithIsolationKeyFallback out of handler.find 2025-09-05 17:30:08 +02:00
Earl Warren
c48accfb51
chore: cache: generate mocks for act/artifactcache/caches.go 2025-09-05 17:30:08 +02:00
Earl Warren
c28a98082b
chore: cache: move repo != cache.Repo in readCache
- it only is used after calling readCache
- add unit test

it reduces the number of testcase to be considered in handler
2025-09-05 17:30:08 +02:00
Earl Warren
6c4e705f97
chore: cache: split caches implementation out of handler
- create the caches interface and matching cachesImpl
- move the cache logic out of handler
  - openDB
  - readCache
  - useCache
  - gcCache
  - access to the storage struct
    - serve
    - commit
    - exist
    - write
- add getCaches / setCaches to the handler interface so it can be
  used by tests. The caches test should be implemented independently
  in the future but this is a different kind of cleanup.
- no functional change, minimal refactor
2025-09-05 17:30:08 +02:00