BuildCache class final
Persistent build cache for step-level caching.
Stores metadata about completed steps in
.dart_tool/native_prebuilt/build-cache/<project>/<target>/<fingerprint>/meta.json.
On cache hit: the step is skipped. On cache miss: the step is executed and its output recorded.
Constructors
- BuildCache({required String projectName, required String targetLabel, Directory? cacheRoot, Logger? logger})
-
const
Properties
- cacheDir → Directory
-
Get the base directory for this project+target cache.
no setter
- cacheRoot → Directory?
-
Optional override for the cache root directory.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- logger → Logger?
-
Optional logger.
final
- projectName → String
-
The project name (used as subdirectory under cache root).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- targetLabel → String
-
The target label (e.g.,
linux-x64,android-arm64).final
Methods
-
clear(
) → Future< void> - Clear all cached data for this project+target.
-
getCachedArtifacts(
NativeStepFingerprint fingerprint) → Future< List< Map< >String, Object?> > - Retrieve cached artifact declarations for a step.
-
invalidate(
NativeStepFingerprint fingerprint) → Future< void> - Invalidate the cache for a specific step.
-
isCached(
NativeStepFingerprint fingerprint) → Future< bool> -
Check if a step with the given
fingerprinthas been cached. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
record(
{required NativeStepFingerprint fingerprint, List< String> outputPaths = const [], List<Map< artifactDeclarations = const []}) → Future<String, Object?> >void> - Record a completed step in the cache.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited