mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-25 06:16:58 +00:00
rename ownerExistance->ownerExistanceKeyPrefix
This commit is contained in:
parent
cccf733561
commit
75499672fd
1 changed files with 2 additions and 2 deletions
|
@ -28,7 +28,7 @@ const (
|
||||||
branchTimestampCacheKeyPrefix = "branchTime"
|
branchTimestampCacheKeyPrefix = "branchTime"
|
||||||
defaultBranchCacheKeyPrefix = "defaultBranch"
|
defaultBranchCacheKeyPrefix = "defaultBranch"
|
||||||
rawContentCacheKeyPrefix = "rawContent"
|
rawContentCacheKeyPrefix = "rawContent"
|
||||||
ownerExistance = "ownerExist"
|
ownerExistanceKeyPrefix = "ownerExist"
|
||||||
|
|
||||||
// pages server
|
// pages server
|
||||||
PagesCacheIndicatorHeader = "X-Pages-Cache"
|
PagesCacheIndicatorHeader = "X-Pages-Cache"
|
||||||
|
@ -265,7 +265,7 @@ func (client *Client) GiteaGetRepoDefaultBranch(repoOwner, repoName string) (str
|
||||||
}
|
}
|
||||||
|
|
||||||
func (client *Client) GiteaCheckIfOwnerExists(owner string) (bool, error) {
|
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 {
|
if exist, ok := client.responseCache.Get(cacheKey); ok && exist != nil {
|
||||||
return exist.(bool), nil
|
return exist.(bool), nil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue