gitea: code.gitea.io/gitea/modules/cache Index | Files

package cache

import "code.gitea.io/gitea/modules/cache"

Index

Package Files

cache.go last_commit.go

func GetInt Uses

func GetInt(key string, getFunc func() (int, error)) (int, error)

GetInt returns key value from cache with callback when no key exists in cache

func GetInt64 Uses

func GetInt64(key string, getFunc func() (int64, error)) (int64, error)

GetInt64 returns key value from cache with callback when no key exists in cache

func GetString Uses

func GetString(key string, getFunc func() (string, error)) (string, error)

GetString returns the key value from cache with callback when no key exists in cache

func NewContext Uses

func NewContext() error

NewContext start cache service

func Remove Uses

func Remove(key string)

Remove key from cache

type LastCommitCache Uses

type LastCommitCache struct {
    mc.Cache
    // contains filtered or unexported fields
}

LastCommitCache represents a cache to store last commit

func NewLastCommitCache Uses

func NewLastCommitCache(repoPath string, gitRepo *git.Repository, ttl int64) *LastCommitCache

NewLastCommitCache creates a new last commit cache for repo

func (LastCommitCache) Get Uses

func (c LastCommitCache) Get(ref, entryPath string) (*object.Commit, error)

Get get the last commit information by commit id and entry path

func (LastCommitCache) Put Uses

func (c LastCommitCache) Put(ref, entryPath, commitID string) error

Put put the last commit id with commit and entry path

Package cache imports 10 packages (graph) and is imported by 52 packages. Updated 2020-07-28. Refresh now. Tools for package owners.