getItemInfo method
Gets information about the state of an element in cache.
key - Element identifier
Returns detailed element information or null if it doesn't exist
Implementation
@override
Future<CacheItemInfo?> getItemInfo(String key) async {
await _ensureInitialized();
final metadata = _metadataCache[key];
if (metadata == null) return null;
return CacheItemInfo(
key: key,
sizeInBytes: metadata.sizeInBytes,
createdAt: metadata.createdAt,
lastAccessedAt: metadata.lastAccessedAt,
expiresAt: metadata.expiresAt,
accessCount: metadata.accessCount,
);
}