ContentAddressableCache class

Constructors

ContentAddressableCache({String? cacheDir})

Properties

cacheDir String
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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

Operators

operator ==(Object other) bool
The equality operator.
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.