Cache.set

void set(string key, T value) @safe

Stores a value in the cache with the default TTL.

Parameters

keyCache key
valueValue to cache
void set(string key, T value, Duration ttl) @safe

Stores a value in the cache with a custom TTL.

Parameters

keyCache key
valueValue to cache
ttlTime-to-live for this entry