@experteam-mx/ngx-services 20.8.6-dev3.0 → 20.9.0-dev1.0
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 +8 -2
- package/fesm2022/experteam-mx-ngx-services.mjs +322 -124
- package/fesm2022/experteam-mx-ngx-services.mjs.map +1 -1
- package/index.d.ts +598 -187
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -22,8 +22,12 @@ import { routes } from './app.routes'
|
|
|
22
22
|
|
|
23
23
|
const envs = {
|
|
24
24
|
...environment,
|
|
25
|
-
authCookie: 'token'
|
|
26
|
-
|
|
25
|
+
authCookie: 'token'
|
|
26
|
+
// cacheRoutes is opt-in; omit or leave empty until routes are registered:
|
|
27
|
+
// cacheRoutes: [
|
|
28
|
+
// { pattern: '/api/catalogs', ttl: 60_000 },
|
|
29
|
+
// { pattern: '/api/companies/.+/branches', ttl: 30_000 }
|
|
30
|
+
// ]
|
|
27
31
|
} as Environment
|
|
28
32
|
|
|
29
33
|
export const appConfig: ApplicationConfig = {
|
|
@@ -41,6 +45,8 @@ export const appConfig: ApplicationConfig = {
|
|
|
41
45
|
|
|
42
46
|
`provideNgxServices` registers `ENVIRONMENT_TOKEN`, which is required by the API services and some interceptors in this package.
|
|
43
47
|
|
|
48
|
+
`httpCachingInterceptor` caches only GET requests whose URL matches an entry in `cacheRoutes` (first matching RegExp pattern wins). With no routes configured, nothing is cached.
|
|
49
|
+
|
|
44
50
|
## NgModule compatibility
|
|
45
51
|
|
|
46
52
|
`NgxServicesModule.forRoot(environment)` is still available for compatibility, but it is deprecated for new standalone applications and will be removed in `20.2.0`.
|