isStaleWhileRevalidate method
Returns true if the entry is stale (past TTL) but within the Stale-While-Revalidate window.
Implementation
bool isStaleWhileRevalidate([DateTime? now]) {
final current = (now ?? DateTime.now().toUtc());
final age = current.difference(createdAt);
if (age <= ttl) return false;
if (staleWhileRevalidate == null) return false;
return age <= (ttl + staleWhileRevalidate!);
}