caching

What is the correct way to prevent caching on ajax calls?

别来无恙 提交于 2020-08-27 13:45:11
问题 I have an AJAX-call, which returns values from a ever changing database, based on simple standard parameters, like month of year. In IE, this function returns cached data, which it never should. I've monitored the server side, and it isn't contacted by the client. Now, my title question has been asked in different ways, many times here already. The top two solutions are: set cache: false Pass a random number/string/timestamp to make the call unique. The thing is though, that cache: false

How to control cache in Nestjs?

谁说我不能喝 提交于 2020-08-27 12:33:25
问题 I read the doc of nestjs recently, and learned something from it. But I found something that puzzled me. In Techniques/Caching, the doc shows me to use a decorator like @UseInterceptors(CacheInterceptor) on a controller to cache its response (default track by route). I wrote a testcase and found it's useful. But I didn't find any explanation to show how to clean the cache. That means I have to wait for the cache to expire. In my opinion, a cache store must provide an API to clear the cache by

How to control cache in Nestjs?

依然范特西╮ 提交于 2020-08-27 12:33:19
问题 I read the doc of nestjs recently, and learned something from it. But I found something that puzzled me. In Techniques/Caching, the doc shows me to use a decorator like @UseInterceptors(CacheInterceptor) on a controller to cache its response (default track by route). I wrote a testcase and found it's useful. But I didn't find any explanation to show how to clean the cache. That means I have to wait for the cache to expire. In my opinion, a cache store must provide an API to clear the cache by

How to control cache in Nestjs?

柔情痞子 提交于 2020-08-27 12:29:08
问题 I read the doc of nestjs recently, and learned something from it. But I found something that puzzled me. In Techniques/Caching, the doc shows me to use a decorator like @UseInterceptors(CacheInterceptor) on a controller to cache its response (default track by route). I wrote a testcase and found it's useful. But I didn't find any explanation to show how to clean the cache. That means I have to wait for the cache to expire. In my opinion, a cache store must provide an API to clear the cache by