@@ -141,30 +141,6 @@ Alias for [`defineCachedFunction`](#definecachedfunction).
141141
142142---
143143
144- ### ` defineCachedHandler `
145-
146- ` ` ` ts
147- function defineCachedHandler <E extends HTTPEvent = HTTPEvent > (
148- handler : EventHandler < E > ,
149- opts : CachedEventHandlerOptions < E > = defaultCacheOptions () as CachedEventHandlerOptions <E >,
150- ): EventHandler < E > ;
151- ` ` `
152-
153- Wraps an HTTP event handler with response caching.
154-
155- Automatically generates cache keys from the URL path and variable headers,
156- sets ` cache -control ` , ` etag ` , and ` last -modified ` headers, and handles
157- ` 304 Not Modified ` responses via conditional request headers.
158-
159- **Parameters:**
160-
161- - ** ` handler ` ** — The event handler to cache.
162- - ** ` opts ` ** — Cache and HTTP-specific configuration options.
163-
164- **Returns:** — A new event handler that serves cached responses when available.
165-
166- ---
167-
168144### ` createMemoryStorage `
169145
170146` ` ` ts
@@ -195,6 +171,30 @@ Sets a custom storage implementation to be used by all cached functions.
195171
196172---
197173
174+ ### ` defineCachedHandler `
175+
176+ ``` ts
177+ function defineCachedHandler<E extends HTTPEvent = HTTPEvent >(
178+ handler : EventHandler <E >,
179+ opts : CachedEventHandlerOptions <E > = defaultCacheOptions () as CachedEventHandlerOptions <E >,
180+ ): EventHandler <E >;
181+ ```
182+
183+ Wraps an HTTP event handler with response caching.
184+
185+ Automatically generates cache keys from the URL path and variable headers,
186+ sets ` cache-control ` , ` etag ` , and ` last-modified ` headers, and handles
187+ ` 304 Not Modified ` responses via conditional request headers.
188+
189+ ** Parameters:**
190+
191+ - ** ` handler ` ** — The event handler to cache.
192+ - ** ` opts ` ** — Cache and HTTP-specific configuration options.
193+
194+ ** Returns:** — A new event handler that serves cached responses when available.
195+
196+ ---
197+
198198### ` ServerRequest `
199199
200200``` ts
@@ -270,9 +270,7 @@ Conditional cache header options passed to the `handleCacheHeaders` hook.
270270### ` CachedEventHandlerOptions `
271271
272272` ` ` ts
273- interface CachedEventHandlerOptions <
274- E extends HTTPEvent = HTTPEvent ,
275- > extends Omit <
273+ interface CachedEventHandlerOptions < E extends HTTPEvent = HTTPEvent > extends Omit <
276274 CacheOptions < ResponseCacheEntry , [E ]> ,
277275 " transform" | " validate"
278276>
0 commit comments