http-request-manager 18.13.0 → 18.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -176,6 +176,30 @@ export class UsersComponent {
|
|
|
176
176
|
}
|
|
177
177
|
```
|
|
178
178
|
|
|
179
|
+
### Request Tracking Options (Database Mode)
|
|
180
|
+
|
|
181
|
+
`HTTPManagerStateService` supports request tracking options for `fetchRecords` and `fetchStream` when database caching is configured (`DatabaseStorage` provided in the service constructor).
|
|
182
|
+
|
|
183
|
+
```typescript
|
|
184
|
+
service.fetchRecords(RequestOptions.adapt({
|
|
185
|
+
path: ['ai/pagination?page=0&size=25'],
|
|
186
|
+
watchParams: ['page', 'size'],
|
|
187
|
+
watchExpiresAt: '10s'
|
|
188
|
+
}));
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Supported request options:
|
|
192
|
+
|
|
193
|
+
- `watchParams`: Query keys you want to track for request-change behavior.
|
|
194
|
+
- `watchExpiresAt`: Expiry window for tracked values (examples: `10s`, `5mn`, `1h`).
|
|
195
|
+
- `watchParamExpiry` / `watchParamsExpire`: Alias naming used in demos/legacy wiring; map to the same expiry behavior.
|
|
196
|
+
|
|
197
|
+
Behavior notes:
|
|
198
|
+
|
|
199
|
+
- Database enabled (`DatabaseStorage` configured): tracker is active, repeated identical query values are blocked until expiry, then can call API again.
|
|
200
|
+
- Database disabled: tracker is bypassed; requests call the API directly each time.
|
|
201
|
+
- `forceRefresh: true` always forces an API call.
|
|
202
|
+
|
|
179
203
|
## ⚙️ Configuration
|
|
180
204
|
|
|
181
205
|
### Module Initialization (`forRoot`)
|