question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Ability to configure excluded endpoints for Cache Interceptor

See original GitHub issue

I’m submitting a…


[ ] Regression 
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

The Cache Interceptor applies to every Get endpoint in a Controller with the @UseInterceptors(CacheInterceptor) applied to the Class.

Where the Cache Interceptor is configured globally, it applies to every Get endpoint in the entire application.

Expected behavior

It would be convenient to be able to configure Cache to be globally on, but be able identify specific Get endpoints where it does not apply.

What is the motivation / use case for changing the behavior?

I would like the convenience and consistency of a globally applied cache for read requests - with the ability to identify endpoints that are not cached

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jamshallycommented, Sep 5, 2018

@kamilmysliwiec - thanks for the reply and example.

For me, I think it will be easier and more maintainable to create a NoCache decorator, that can be applied to the desired endpoints (and honored by the HttpCacheInterceptor).

LMK if this is something you would be interested in for the NestJS common library, and I can have a go at creating a PR for this.

1reaction
marcus-sacommented, Nov 29, 2018

I have no problem with new decorators and features, as long as they’re not in the core package. Be careful the common package doesn’t get bloated with useless features for a lot of people, instead it should belong in their own official package, such as @nestjs/cache

Read more comments on GitHub >

github_iconTop Results From Across the Web

Istio 1.14 Change Notes
Added new configuration options to istio-iptables and istio-clean-iptables for including/excluding certain user groups from interception of ...
Read more >
Contexts and Dependency Injection - Quarkus
In such case, it's possible to exclude types and dependencies from the bean discovery. The quarkus.arc.exclude-types property accepts a list of string ...
Read more >
Secure Endpoint Best Practices Guide - Cisco
Secure Endpoint policies need to be configured so that the features selected provide the best endpoint security while users are not impacted by...
Read more >
Spring Security bypass URL or Filter - java - Stack Overflow
The issue is that the filter executes correctly for every single URI, but I want to be able to exclude some endpoints from...
Read more >
Cloud Native Applications - Spring
The starting point is a set of features to which all components in a ... for common configuration files and has endpoints for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found