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

persistent kind Internal Server Error #29

Open
Mohamed-Emara77 opened this issue Jun 13, 2024 · 1 comment
Open

persistent kind Internal Server Error #29

Mohamed-Emara77 opened this issue Jun 13, 2024 · 1 comment

Comments

@Mohamed-Emara77
Copy link

Mohamed-Emara77 commented Jun 13, 2024

Issue
persistent kind Internal Server Error when applied to an API with params

Docs
persistent cache must used on method without parameters, otherwise, it will throw error that presents persistent cache cannot applied to method that have parameters.

expected behaviour

it should act like temporal kind with ttl = 0 which means infinity time to live cache
each request should be treated as a separate key

for example :
@Get('/uploads/:filename') async getFile(@Param('filename') filename: string){ return await this.service.getFile(fileName); }
in the above example each request scoped under uploads API with a specific file name should have a cache key

if file name is test.png then key should look like this key:uploads/test.png
if file name is guest.png then key should look like this key:uploads/guest.png

make sure to include query params as well

actual behaviour
Internal server error

Great package by the way many thanks

@BJS-kr
Copy link
Owner

BJS-kr commented Jun 15, 2024

It was intentional. but if you want persistent cache with parameters, I'll add that feature

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