How To Setup Caching in Nodejsby@vlio
460 reads

How To Setup Caching in Nodejs

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

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

@vlio

Vlad Ioffe

Father of 2, husband and a software engineer


Receive Stories from @vlio

react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!