From c63ca484508153ad638af7e9fca58fb0e390155a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=AD=20Siqueira?= Date: Thu, 30 Jan 2020 13:23:26 -0300 Subject: [PATCH 1/2] fix: rename the HTTP_CACHE_CONFIG injection token desc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raí Siqueira --- projects/ngneat/cashew/src/lib/httpCacheConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/ngneat/cashew/src/lib/httpCacheConfig.ts b/projects/ngneat/cashew/src/lib/httpCacheConfig.ts index 6f83e4c..ae1d244 100644 --- a/projects/ngneat/cashew/src/lib/httpCacheConfig.ts +++ b/projects/ngneat/cashew/src/lib/httpCacheConfig.ts @@ -36,4 +36,4 @@ export function withCache(params: Params = {}): any { }; } -export const HTTP_CACHE_CONFIG = new InjectionToken('HTTP_CAACHE_CONFIG'); +export const HTTP_CACHE_CONFIG = new InjectionToken('HTTP_CACHE_CONFIG'); From 0e0f63b82866deb6f88c02195e6323c5033ef254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=AD=20Siqueira?= Date: Thu, 2 Jul 2020 15:51:51 -0300 Subject: [PATCH 2/2] docs(readme): update readme links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raí Siqueira --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a12a2cf..01c80eb 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ Let's go over each of the configuration options: Defines the caching behavior. The library supports two different strategies: - `explicit` (default) - **only** caches API requests that explicitly use the `withCache` function -- `implicit` - caches API requests that are of type `GET` and the response type is `JSON`. You can change this behavior by overriding the `HttpCacheGuard` provider. (See the [Hackable](#hackable) section) +- `implicit` - caches API requests that are of type `GET` and the response type is `JSON`. You can change this behavior by overriding the `HttpCacheGuard` provider. (See the [Hackable](#hack-the-library) section) ```ts HttpCacheInterceptorModule.forRoot({ @@ -143,6 +143,7 @@ HttpCacheInterceptorModule.forRoot({ Define the `HttpParameterCodec` implementation if you need a different parameter encoder. Example of custom implementation that uses `encodeURIComponent`: + ```ts import { HttpCacheInterceptorModule, useHttpCacheLocalStorage } from '@ngneat/cashew'; @@ -206,7 +207,7 @@ Currently, there is no way in Angular to pass `metadata` to an interceptor. The - `cache$` - Whether to cache the request (defaults to `true`) - `ttl$` - TTL that will override the global - `key$` - Custom key. (defaults to the request URL including any query params) -- `bucket$` - The [bucket](#cache-bucket) in which we save the keys +- `bucket$` - The [bucket](#cachebucket) in which we save the keys ```ts @Injectable()