existance->existence

This commit is contained in:
Jean-Marie 'Histausse' Mineau 2024-02-19 23:26:38 +01:00
parent 75499672fd
commit 51d331d658
No known key found for this signature in database
GPG Key ID: B66AEEDA9B645AD2
2 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ const (
// TODO: move as option into cache interface
fileCacheTimeout = 5 * time.Minute
// ownerExistanceCacheTimeout specifies the timeout for the existence of a repo/org
// ownerExistenceCacheTimeout specifies the timeout for the existence of a repo/org
ownerExistenceCacheTimeout = 5 * time.Minute
// fileCacheSizeLimit limits the maximum file size that will be cached, and is set to 1 MB by default.

View File

@ -28,7 +28,7 @@ const (
branchTimestampCacheKeyPrefix = "branchTime"
defaultBranchCacheKeyPrefix = "defaultBranch"
rawContentCacheKeyPrefix = "rawContent"
ownerExistanceKeyPrefix = "ownerExist"
ownerExistenceKeyPrefix = "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", ownerExistanceKeyPrefix, owner)
cacheKey := fmt.Sprintf("%s/%s", ownerExistenceKeyPrefix, owner)
if exist, ok := client.responseCache.Get(cacheKey); ok && exist != nil {
return exist.(bool), nil