SrcFileCache is a /tmp/nocc/cpp/src-cache directory, where uploaded .cpp/.h/etc. files are saved. It's supposed that sha256 uniquely identifies the file, that's why a map key doesn't contain size/mtime. It's useful to share files across clients (if one client has uploaded a file, the second takes it
| 11 | // It's useful to share files across clients (if one client has uploaded a file, the second takes it from cache). |
| 12 | // Also, it helps reuse files across the same client after it was considered inactive and deleted, but launched again. |
| 13 | type SrcFileCache struct { |
| 14 | *FileCache |
| 15 | } |
| 16 | |
| 17 | func MakeSrcFileCache(cacheDir string, limitBytes int64) (*SrcFileCache, error) { |
| 18 | cache, err := MakeFileCache(cacheDir, limitBytes) |
nothing calls this directly
no outgoing calls
no test coverage detected