package cache

Import Path
	github.com/evanw/esbuild/internal/cache (on go.dev)

Dependency Relation
	imports 8 packages, and imported by 3 packages

Involved Source Files cache.go cache_ast.go cache_fs.go
Package-Level Type Names (total 12, in which 7 are exported)
/* sort exporteds by: | */
This is a cache of the parsed contents of a set of files. The idea is to be able to reuse the results of parsing between builds and make subsequent builds faster by avoiding redundant parsing work. This only works if: * The AST information in the cache must be considered immutable. There is no way to enforce this in Go, but please be disciplined about this. The ASTs are shared in between builds. Any information that must be mutated in the AST during a build must be done on a shallow clone of the data if the mutation happens after parsing (i.e. a clone that clones everything that will be mutated and shares only the parts that won't be mutated). * The information in the cache must not depend at all on the contents of any file other than the file being cached. Invalidating an entry in the cache does not also invalidate any entries that depend on that file, so caching information that depends on other files can result in incorrect results due to reusing stale data. For example, do not "bake in" some value imported from another file. * Cached ASTs must only be reused if the parsing options are identical between builds. For example, it would be bad if the AST parser depended on options inherited from a nearby "package.json" file but those options were not part of the cache key. Then the cached AST could incorrectly be reused even if the contents of that "package.json" file have changed. CSSCache CSSCache FSCache FSCache JSCache JSCache JSONCache JSONCache SourceIndexCache SourceIndexCache func MakeCacheSet() *CacheSet func github.com/evanw/esbuild/internal/bundler.ScanBundle(log logger.Log, fs fs.FS, res resolver.Resolver, caches *CacheSet, entryPoints []string, options config.Options) bundler.Bundle func github.com/evanw/esbuild/internal/resolver.NewResolver(fs fs.FS, log logger.Log, caches *CacheSet, options config.Options) resolver.Resolver
(*T) Parse(log logger.Log, source logger.Source, options css_parser.Options) css_ast.AST
(*T) ReadFile(fs fs.FS, path string) (string, error)
(*T) Parse(log logger.Log, source logger.Source, options js_parser.Options) (js_ast.AST, bool)
(*T) Parse(log logger.Log, source logger.Source, options js_parser.JSONOptions) (js_ast.Expr, bool) func github.com/evanw/esbuild/internal/resolver.ParseTSConfigJSON(log logger.Log, source logger.Source, jsonCache *JSONCache, extends func(string, logger.Range) *resolver.TSConfigJSON) *resolver.TSConfigJSON
(*T) Get(path logger.Path, kind SourceIndexKind) uint32 (*T) LenHint() uint32
func (*SourceIndexCache).Get(path logger.Path, kind SourceIndexKind) uint32 const SourceIndexJSStubForCSS const SourceIndexNormal
Package-Level Functions (only one, which is exported)
Package-Level Constants (total 2, both are exported)