Versions in this module Expand all Collapse all v0 v0.2.2 Jun 27, 2025 v0.2.1 Jun 27, 2025 Changes in this version + var ErrHostnameMustNotContainPath = errors.New("hostName must not contain a path") + var ErrHostnameMustNotContainScheme = errors.New("hostName must not contain scheme") + var ErrHostnameNotValid = errors.New("hostName is not valid") + var ErrHostnameRequired = errors.New("hostName is required") + type Cache struct + func New(ctx context.Context, hostName string, db *database.Queries, ...) (*Cache, error) + func (c *Cache) AddLRUCronJob(ctx context.Context, schedule cron.Schedule) + func (c *Cache) AddUpstreamCaches(ctx context.Context, ucs ...upstream.Cache) + func (c *Cache) DeleteNar(ctx context.Context, narURL nar.URL) error + func (c *Cache) DeleteNarInfo(ctx context.Context, hash string) error + func (c *Cache) GetHostname() string + func (c *Cache) GetNar(ctx context.Context, narURL nar.URL) (int64, io.ReadCloser, error) + func (c *Cache) GetNarInfo(ctx context.Context, hash string) (*narinfo.NarInfo, error) + func (c *Cache) PublicKey() signature.PublicKey + func (c *Cache) PutNar(ctx context.Context, narURL nar.URL, r io.ReadCloser) error + func (c *Cache) PutNarInfo(ctx context.Context, hash string, r io.ReadCloser) error + func (c *Cache) SetCacheSignNarinfo(shouldSignNarinfo bool) + func (c *Cache) SetMaxSize(maxSize uint64) + func (c *Cache) SetRecordAgeIgnoreTouch(d time.Duration) + func (c *Cache) SetupCron(ctx context.Context, timezone *time.Location) + func (c *Cache) StartCron(ctx context.Context)