ContentAddressableCache class
Methods
-
get(String integrity)
→ Module?
-
Look up a module by its integrity hash.
Returns null if not in cache.
-
has(String integrity)
→ bool
-
Check if a hash exists in cache.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
put(Module module)
→ String
-
Store a module in the cache. Returns the integrity hash.
-
toString()
→ String
-
A string representation of this object.
inherited
Static Methods
-
defaultCacheDir(Map<String, String> env)
→ String
-
Resolves the default
~/.ball/cache directory from an environment map.
Takes env as a parameter (rather than reading Platform.environment
directly) so both the HOME and USERPROFILE fallback branches are
unit-testable without spawning a subprocess with a scrubbed environment.