scorecard/roundtripper
Azeem Shaikh 96ea5577d1
Update documentation (#583)
Co-authored-by: Azeem Shaikh <azeems@google.com>
2021-06-16 21:05:46 -07:00
..
blob.go 🌱 included copyright headers. 2021-04-01 21:36:10 -05:00
cache.go Update how we record cached requests (#585) 2021-06-16 19:48:41 -07:00
census.go Update how we record cached requests (#585) 2021-06-16 19:48:41 -07:00
github.go Fix bug in GitHub token access (#490) 2021-05-22 11:24:53 -07:00
rate_limit.go Update how we record cached requests (#585) 2021-06-16 19:48:41 -07:00
README.md Update documentation (#583) 2021-06-16 21:05:46 -07:00
roundtripper_test.go Fix lint issues: thelper linter (#447) 2021-05-13 12:09:32 +00:00
roundtripper.go 🌱 Fix lint issues: Replace golint with revive (#493) 2021-05-24 11:34:33 -07:00

Caching

Scorecard uses httpcache with https://docs.github.com/en/rest/overview/resources-in-the-rest-api#conditional-requests for caching httpresponse. The default cache is in-memory.

Some details on caching https://github.com/ossf/scorecard/issues/80#issuecomment-782723182

Blob Cache

Scorecard results can be cached into a blob for increasing throughput for subsequent runs.

To use blob cache two env variables have to be set USE_BLOB_CACHE=true and BLOB_URL=gs://scorecards-cache/.

The code uses https://github.com/google/go-cloud for blob caching. It is compatible with GCS,S3 and Azure blob.

Disk Cache

Scorecard results can be cached into a disk for increasing throughput for subsequent runs.

To use disk cache two env variables have to be set USE_DISK_CACHE=true and DISK_CACHE_PATH=./cache.

There is no TTL on cache.

The default cache size is 10GB.