Speed Up Your Fastify App with a Custom Cache Plugin
Custom Cache plugin in Fastify using hooks and node-cache.
➥ Repo: https://github.com/pragmatic-reviews/fastify-test/tree/fastify-hooks
➥ Buy Me a Coffee: https://buymeacoff.ee/pragmatic
➥ node-cache module: https://github.com/node-cache/node-cache
➥ Fastify Lifecycle: https://www.fastify.io/docs/latest/Lifecycle/
➥➥ Learn even more! ➥➥
Learn Next.js ➥ https://bit.ly/PragmaticNext
Learn Contentful ➥ https://bit.ly/PragmaticContentful
Learn Strapi ➥ http://bit.ly/PragmaticStrapi
Learn Gatsby ➥ https://bit.ly/PragmaticGatsby
Learn Deno ➥ https://bit.ly/LearnDeno
Learn GraphQL ➥ https://bit.ly/LearnGraphQL
Golang in the Cloud ➥ https://bit.ly/LearnGolangCloud
Gin Crash Course ➥ http://bit.ly/2SXdJu2
Golang Crash Course ➥ http://bit.ly/39ZH8dy
Zapier Crash Course ➥ http://bit.ly/37q1BGt
Timestamps:
Intro - 0:00
What we've done so far - 0:40
Setting up the cache plugin and node-cache module - 1:16
Setting up the custom cache with hooks (onRequest) - 2:37
Setting up the custom cache with hooks (onSend) - 5:12
Setting up a TTL for the keys of the cache - 7:05
Using Fastify Plugin to enable access from parent context - 7:45
Adding function to handle node-cache's 'expired' event - 8:39
Adding console logging - 9:33
Fixing parameters of 'expired' event handler (key, value) - 11:20
Testing custom cache - 11:36
Outro - 12:43
#Fastify #Hooks #Cache
Видео Speed Up Your Fastify App with a Custom Cache Plugin канала Pragmatic Reviews
➥ Repo: https://github.com/pragmatic-reviews/fastify-test/tree/fastify-hooks
➥ Buy Me a Coffee: https://buymeacoff.ee/pragmatic
➥ node-cache module: https://github.com/node-cache/node-cache
➥ Fastify Lifecycle: https://www.fastify.io/docs/latest/Lifecycle/
➥➥ Learn even more! ➥➥
Learn Next.js ➥ https://bit.ly/PragmaticNext
Learn Contentful ➥ https://bit.ly/PragmaticContentful
Learn Strapi ➥ http://bit.ly/PragmaticStrapi
Learn Gatsby ➥ https://bit.ly/PragmaticGatsby
Learn Deno ➥ https://bit.ly/LearnDeno
Learn GraphQL ➥ https://bit.ly/LearnGraphQL
Golang in the Cloud ➥ https://bit.ly/LearnGolangCloud
Gin Crash Course ➥ http://bit.ly/2SXdJu2
Golang Crash Course ➥ http://bit.ly/39ZH8dy
Zapier Crash Course ➥ http://bit.ly/37q1BGt
Timestamps:
Intro - 0:00
What we've done so far - 0:40
Setting up the cache plugin and node-cache module - 1:16
Setting up the custom cache with hooks (onRequest) - 2:37
Setting up the custom cache with hooks (onSend) - 5:12
Setting up a TTL for the keys of the cache - 7:05
Using Fastify Plugin to enable access from parent context - 7:45
Adding function to handle node-cache's 'expired' event - 8:39
Adding console logging - 9:33
Fixing parameters of 'expired' event handler (key, value) - 11:20
Testing custom cache - 11:36
Outro - 12:43
#Fastify #Hooks #Cache
Видео Speed Up Your Fastify App with a Custom Cache Plugin канала Pragmatic Reviews
fastify fastify cache fastify custom cache fastify endpoints fastify env fastify get endpoint fastify global error fastify hooks fastify middleware fastify mongo fastify mongodb fastify node fastify node js framework fastify plugin fastify post endpoint fastify routing fastify schema fastify schemas fastify server fastify tutorial fastify web framework javascript json schemas learn fastify mongodb integration node cache node js tutorial nodejs
Комментарии отсутствуют
Информация о видео
3 мая 2021 г. 21:00:17
00:13:00
Другие видео канала