Skip to content

cache: use platform as the cache keys #39895

@jamietanna

Description

@jamietanna

It was recently noticed that we use a camelCase variant of the platform name in RepoCacheData only for bitbucketServer.

bitbucketServer should be cased as bitbucket-server (

export const PLATFORM_HOST_TYPES = [
'azure',
'bitbucket',
'bitbucket-server',
'codecommit',
'forgejo',
'gerrit',
'gitea',
'github',
'gitlab',
'local',
] as const;
) as that matches the platform name.

We should fix this, so it's a 1-1 mapping between a platform name and a cache key or make sure that there's a way to pass a platform and receive the cache settings for that platform.

This can either be done as a breaking change (in the next major) or as a non-breaking change for now, and then made breaking in the future, for consistency.

Metadata

Metadata

Assignees

Labels

priority-3-mediumDefault priority, "should be done" but isn't prioritised ahead of others

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions