set method

  1. @override
void set(
  1. String key,
  2. CacheEntry entry
)
override

Stores a cache entry with the given key.

If an entry with the same key already exists, it should be replaced.

Implementations may enforce size limits and evict old entries as needed (e.g., LRU eviction).

Implementation

@override
void set(String key, CacheEntry entry) {
  _storageBox.put(key, entry.toJson());
}