get abstract method

Future get(
  1. String key
)

Retrieves a value from the cache by its key.

Returns the cached value associated with the key if it exists and has not expired. If the key does not exist or has expired, returns null.

Throws an exception if the key is null or empty. Implementations should handle deserialization of the stored value if necessary.

  • Parameters:
    • key: A non-null, non-empty string representing the cache key.
  • Returns: The cached value, or null if not found or expired.

Implementation

Future<dynamic> get(String key);