Add LRU cache provider (200 entries) to prevent unbounded SWR memory growth. Clean up stale PKCE localStorage keys on app init. Cap chart annotations to 20 visible reference lines with overflow indicator.
13 lines
304 B
TypeScript
13 lines
304 B
TypeScript
'use client'
|
|
|
|
import { SWRConfig } from 'swr'
|
|
import { boundedCacheProvider } from '@/lib/swr/cache-provider'
|
|
|
|
export default function SWRProvider({ children }: { children: React.ReactNode }) {
|
|
return (
|
|
<SWRConfig value={{ provider: boundedCacheProvider }}>
|
|
{children}
|
|
</SWRConfig>
|
|
)
|
|
}
|