paint-brush
How To Setup Caching in Nodejsby@vlio
508 reads
508 reads

How To Setup Caching in Nodejs

by Vlad Ioffe3mJanuary 24th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

In this article I show you how you could use the @memoizeAsync decorator, from the utils-decorators library, in your application (both node and web) in one of the most elegant and simple ways to use the decorator. The decorator will put as the key of a cache entry the string which is generated by running JSONstringify on the provided arguments to the decorated method. The AsyncCache interface resembles the Cache interface but every operation is async (returning a Promise)

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - How To Setup Caching in Nodejs
Vlad Ioffe HackerNoon profile picture
Vlad Ioffe

Vlad Ioffe

@vlio

Father of 2, husband and a software engineer

About @vlio
LEARN MORE ABOUT @VLIO'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Vlad Ioffe HackerNoon profile picture
Vlad Ioffe@vlio
Father of 2, husband and a software engineer

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite