Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: Implicit strategy broken in v2? #40

Closed
enekonieto opened this issue Jun 17, 2021 · 1 comment
Closed

Regression: Implicit strategy broken in v2? #40

enekonieto opened this issue Jun 17, 2021 · 1 comment

Comments

@enekonieto
Copy link

Implicit strategy seems to require using withCache()

In 2.0.1 cache-interceptor.ts has this:

intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
    const context = request.context.get(CACHE_CONTEXT);

    if (context === undefined) {
      return next.handle(request);
    }
...

If I have not misunderstood the logic of the code, this will always return the request unchanged unless you use withCache().

In 1.3.2 httpCacheInterceptor.ts had a different logic and starts asking CacheGuard.

@NetanelBasal
Copy link
Member

Correct, I will fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants