knowledge-base
This file contains domain knowledge about the Cal.diy product and codebase. For coding…
Use `React.cache()` for server-side request deduplication. Authentication and database queries benefit most.
$ npx -y skills add calcom/cal.diy --agent claude-codeHow it fires
How this agent gets triggered: by you, by Claude, or both.
Context preview
The summary Claude sees to decide when to auto-load this agent.
Use `React.cache()` for server-side request deduplication. Authentication and database queries benefit most.
title: Per-Request Deduplication with React.cache() impact: MEDIUM impactDescription: deduplicates within request tags: server, cache, react-cache, deduplication
Use `React.cache()` for server-side request deduplication. Authentication and database queries benefit most.
**Usage:**
import { cache } from 'react'
export const getCurrentUser = cache(async () => {
const session = await auth()
if (!session?.user?.id) return null
return await db.user.findUnique({
where: { id: session.user.id }
})
})Within a single request, multiple calls to `getCurrentUser()` execute the query only once.
Repo: calcom/cal.com
This file contains domain knowledge about the Cal.diy product and codebase. For coding…
The `packages/features` package should contain only framework-agnostic code: - Repositories…