这是indexloc提供的服务,不要输入任何密码
Skip to content

Display whether cache hit is from local or remote #302

@jaredpalmer

Description

@jaredpalmer

Describe the feature you'd like to request

As a user, I want to know if my cache hit came from my local filesystem or from the remote cache.

Describe the solution you'd like

Right now our cache abstraction for fetch returns a boolean for hit/miss. We should change that to an object or enum which adds source information.

type FetchResult struct {
  // Fetch was successful
  Status: bool,
  // Source: local, remote
  Source: string,
}

Describe alternatives you've considered

Could alter the shape of the struct to simplify things.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions