Documentation
¶
Index ¶
Constants ¶
View Source
const (
MetdataRestoreName = "core::restore-name"
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CachePutRequest ¶
type DlCache ¶
type DlCache interface {
// Resolve resolves the URL to a cache ID.
Resolve(ctx context.Context, url string, metadata Metadata) (CacheID, error)
// Get returns the cached source for the given ID.
Get(ctx context.Context, cid CacheID) (CachedSource, error)
// Put puts the source to the cache.
Put(ctx context.Context, req CachePutRequest) (CacheID, error)
// Restore restores the cached source to the given directory.
Restore(ctx context.Context, id CacheID, dir string) error
// Delete deletes the cached source from the cache.
Delete(ctx context.Context, id CacheID) error
}
type Metadata ¶
Metadata is the metadata of the cache.
Metadata is an additional information about the URL. It is useful for separate same URL to different cache id.
Source Files
¶
- cache.go
Click to show internal directories.
Click to hide internal directories.