User-scoped cache operations - specific to individual users Use for user preferences, recent activity, or personalized data
Delete a value from user cache
The cache key to delete
Promise that resolves when the operation completes
await cache.user.delete('preferences'); Copy
await cache.user.delete('preferences');
Get a value from user cache
The cache key
Promise that resolves to the cached value or null if not found
const preferences = await cache.user.get('preferences'); Copy
const preferences = await cache.user.get('preferences');
Set a value in user cache
The value to cache (must be JSON serializable)
Optional
Cache options including TTL
await cache.user.set('recent_lookups', lookups, { ttl: 3600 }); Copy
await cache.user.set('recent_lookups', lookups, { ttl: 3600 });
User-scoped cache operations - specific to individual users Use for user preferences, recent activity, or personalized data