Skip to content

Commit d715083

Browse files
committed
docs: update
1 parent 1338efd commit d715083

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

‎README.md‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,6 @@ const advancedFetch = createFetch(await caches.open('advanced-cache'), {
306306
defaults: {
307307
cacheControlOverride: 's-maxage=300, stale-while-revalidate=3600',
308308
cacheKeyRules: {
309-
host: true,
310-
pathname: true,
311309
search: { exclude: ['timestamp', '_'] },
312310
header: { include: ['x-api-version'] },
313311
cookie: { include: ['session_id'] },
@@ -367,7 +365,6 @@ const tenantFetch = createFetch(await caches.open('tenant-cache'), {
367365
cacheControlOverride: 's-maxage=300',
368366
cacheKeyRules: {
369367
header: { include: ['x-tenant-id'] },
370-
pathname: true,
371368
search: true,
372369
},
373370
},
@@ -602,8 +599,6 @@ const response = await fetch('https://api.example.com/data', {
602599
ignoreRequestCacheControl: true,
603600
ignoreVary: false,
604601
cacheKeyRules: {
605-
host: true,
606-
pathname: true,
607602
search: false,
608603
device: true,
609604
header: {
@@ -671,8 +666,6 @@ Customize how cache keys are generated to optimize cache hit rates and handle di
671666
sharedCache: {
672667
cacheKeyRules: {
673668
// URL components
674-
host: true, // Include hostname
675-
pathname: true, // Include URL path
676669
search: true, // Include query parameters (default)
677670

678671
// Request context
@@ -692,8 +685,6 @@ sharedCache: {
692685

693686
```typescript
694687
{
695-
host: true,
696-
pathname: true,
697688
search: true,
698689
}
699690
```
@@ -702,8 +693,6 @@ sharedCache: {
702693

703694
#### **URL Components**
704695

705-
- **`host`**: Include the hostname in the cache key
706-
- **`pathname`**: Include the URL path
707696
- **`search`**: Control query parameter inclusion
708697

709698
**Query Parameter Control:**
@@ -1129,8 +1118,6 @@ interface SharedCacheKeyRules {
11291118
cookie?: FilterOptions | boolean;
11301119
device?: FilterOptions | boolean;
11311120
header?: FilterOptions | boolean;
1132-
host?: FilterOptions | boolean;
1133-
pathname?: FilterOptions | boolean;
11341121
search?: FilterOptions | boolean;
11351122
}
11361123
```

0 commit comments

Comments
 (0)