Skip to content

repos: Cache GrantedScopes

Warren Gifford requested to merge core/cache-scope-query into main

Created by: ryanslade

Since fetching scopes needs to hit the code host but code host tokens are immutable it makes sense to cache them. This allows us to treat the GrantedScopes API query as cheap so that we don't need to consider any client side caching.

Caching on the client side would be difficult since we don't actually have access to the tokens there.

For security we cache a hashed version of the token so that it continues to only be stored in one place, an encrypted blob in the config column of the external_services table.

Part of: https://github.com/sourcegraph/sourcegraph/issues/20229

Merge request reports

Loading