Nest.js Caching Tutorial in 15 Minutes (Redis + Unit Testing)
Vložit
- čas přidán 27. 07. 2024
- Learn how to implement powerful caching in Nest.js in order to greatly speed up your apps. We also walk through using Redis as a distributed store and unit testing.
Repo: github.com/mguay22/nestjs-cache
Docs: docs.nestjs.com/techniques/ca...
Timestamps
00:00:00 Project Setup
00:01:01 Register Cache
00:02:16 CacheManager
00:05:17 CacheInterceptor
00:07:56 Unit Testing
00:10:20 Redis
Get my highly-rated Udemy courses at a discount here: michaelguay.dev/udemy/ - Věda a technologie
Get my highly-rated Udemy courses at a discount here: michaelguay.dev/udemy/
Ok first off, it is clear you’ve mastered nestjs. Second of all, this is an excellent explanation. I will have to watch this short video several times to absorb the info youve dished out. Keep it up man you’ve earned yourself a happy subscriber
Every Nestjs developer should watch this 😊. Thanks Micheal
after days of searching online , you made me get how cache/redis work in 15min
thank you so much
keep making videos like this
cheers
Thank you so much, Michael. I couldn't find how to properly mock the cache manager anywhere else. Keep up the good work.
Wooh! Great as always. Thanks Michael!
I am building a new product with nestjs and your videos are gold!
Perfect video, short and to the point. Thanks❤
Great tutorial
I am waiting more videos from you 🚀
Thank you so much
Excellent tutorial. Really clear and precise explanation. Keep up the good work ❤
Top material! Thank you!
You are the best 👍
Please, more cool videos!
Great video!
Great video! Man u should create more videos using Nest and Observable like realtime username validation stuff😊
Good job. Thanks a lot.
Greate video, thank you so much
Thank you so much!
Man you are super awesome. 😒💪
Thx for great video!
Glad you liked it!
Great tutorial! Tnx man!
For those who are struggling with cache not working try to downgrade cache-manager pkg to version 4.1.0, current 5.X version is not compatible with NestJS 8.
Thanks !!
Hi! Great tutorial! If you are going to use cache for a big app, in which cases would you use It? Would you use Redis or another store system? Thanks
Thank you for this video. How do we determine if the Redis cache should be implemented with cache-manager or with a microservice?
Hi @Michael Guay, Do "Auto-caching responses" and "redis store" work together? I tried, somehow, it did not use the redis as the store still?
Great tutorial. Can u do a monitoring and logging NestJS app 😁
Genial Thanks
can you please help ? how much can i cached data by this method ? and where will those data be placing ?
And what about Redis, which method will be better use for caching between cacheManager and Redis ?
Thx
Does TTL also gets saved as part of Redis? I mean if we restart the server, does the TTL reset or no?
how to make a 'unit test' of a controller implementing cacheInterceptor?
Do you have samples of nest js with @google-cloud/storage?
Great tutorial. Thank you.
And how to cache GraphQL requests?
GraphQL isn't supported by the interceptor, so we'll have to cache ourselves using the CacheManager.
@@mguay do you have tutorial about that? (-:
how to config key prefix?
I getting an error at option - store :redisStore
Type 'typeof import("C:/sample/complete-rest-api/node_modules/cache-manager-redis-store/dist/index")' is not assignable to type '(string | CacheStoreFactory | CacheStore)
use cache-manager-redis-yet instead of cache-manager-redis-store
@@RealStoicArchitect Thank you