CacheReport class
Aggregated report for the entire cache system.
Obtained via CacheVault.report().
final report = await CacheVault.report();
print('Total: ${report.totalSizeBytes} bytes in ${report.totalItemCount} items');
for (final b in report.perBucket) {
print(' ${b.displayName}: ${b.sizeBytes} bytes (${b.hitRate * 100}% hit rate)');
}
Constructors
-
CacheReport({required int totalSizeBytes, required int totalItemCount, required List<
BucketReport> perBucket}) -
Creates a new CacheReport.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
perBucket
→ List<
BucketReport> -
Per-bucket breakdown of cache statistics.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- totalItemCount → int
-
Total number of cached items across all buckets.
final
- totalSizeBytes → int
-
Total size in bytes across all buckets.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this report to a JSON-serializable map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited