CacheableManager class abstract final

Manages the scan cache files inside .jetleaf/.

Two separate caches are maintained:

  • .jetleaf/cache_{hash}.bin — production cache (skipTests: true)
  • .jetleaf/test/cache_{hash}.bin — test cache (skipTests: false)

This separation ensures that runScan() and runTestScan() each get their own cache without cross-contamination.

Mixed-in types

Properties

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

Methods

diff(Directory directory, {bool forTests = false}) → CacheDiff
Compares cached file entries against current filesystem state.
equalizedProperties() → List<Object?>
Mixin-style contract for value-based equality, hashCode, and toString.
override
generateFingerprint({required bool skipTests, List<String> packagesToExclude = const [], List<String> packagesToScan = const [], bool enableTreeShaking = false}) → String
Generates a configuration fingerprint from scanner configuration properties.
invalidate(Directory projectRoot, {String configFingerprint = 'default', bool forTests = false}) → Future<void>
Deletes the cache file if it exists.
isValid(Directory directory, {String configFingerprint = 'default', bool forTests = false}) → bool
Checks if a valid cache exists for directory with the given fingerprint.
load(Directory directory, {String configFingerprint = 'default', bool forTests = false}) → CacheDeserializationResult?
Loads the cache from disk. Returns null if cache doesn't exist or is invalid.
loadAny(Directory directory, {bool forTests = false}) → CacheDeserializationResult?
Attempts to load any valid cache from the cache directory, regardless of fingerprint.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
save(List<ClassDeclaration> components, Directory projectRoot, {String configFingerprint = 'default', bool forTests = false, List<Asset> assets = const [], List<Package> packages = const [], List<IndexedLibraryMeta> libraries = const [], Map<String, List<String>> subclasses = const {}, Map<String, List<Map<String, String>>> annotatedMethods = const {}}) → Future<void>
Saves the cache to disk.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited