rename ownerExistance->ownerExistanceKeyPrefix

This commit is contained in:
Jean-Marie 'Histausse' Mineau 2024-02-19 21:35:59 +01:00
parent cccf733561
commit 75499672fd
No known key found for this signature in database
GPG Key ID: B66AEEDA9B645AD2
1 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ const (
branchTimestampCacheKeyPrefix = "branchTime"
defaultBranchCacheKeyPrefix = "defaultBranch"
rawContentCacheKeyPrefix = "rawContent"
ownerExistance = "ownerExist"
ownerExistanceKeyPrefix = "ownerExist"
// pages server
PagesCacheIndicatorHeader = "X-Pages-Cache"
@ -265,7 +265,7 @@ func (client *Client) GiteaGetRepoDefaultBranch(repoOwner, repoName string) (str
}
func (client *Client) GiteaCheckIfOwnerExists(owner string) (bool, error) {
cacheKey := fmt.Sprintf("%s/%s", ownerExistance, owner)
cacheKey := fmt.Sprintf("%s/%s", ownerExistanceKeyPrefix, owner)
if exist, ok := client.responseCache.Get(cacheKey); ok && exist != nil {
return exist.(bool), nil