get<T> abstract method
Retrieves a value from the cache by its key.
This method performs several checks:
- Existence: Checks if the file exists on the storage engine.
- Corruption: If the file is corrupt (invalid JSON), it deletes the file and returns
null. - Expiry: If the item has passed its
expiryTime, it deletes the file and returnsnull.
Side Effect:
If the item is valid, this triggers EvictionManager.updateUsage,
moving the item to the front of the queue (if using LRU strategy).
Implementation
Future<T?> get<T>({required String key});