Simple object cache with ttl expiry.