contains method

bool contains(
  1. String key
)

Checks if a key exists in the cache and is not expired.

Implementation

bool contains(String key) => get(key) != null;