2022-07-21
2262
#nestjs
Chinedu Okere
124188
Jul 21, 2022 â‹… 8 min read

How to add Redis cache to a NestJS app

Chinedu Okere Full-stack software engineer with a track record of success working in food tech, fintech, and cyber tech. Has a passion for developing cutting-edge UIs and web apps that deliver exceptional user experience, Has expertise in frontend technologies such as HTML, CSS, JavaScript, React, and Next.js, as well as backend technologies such as Node.js/Express.js and databases such as MongoDB/MySQL. Contributes to open source technology documentation.

Recent posts:

Exploring The Aha Stack: Astro, Htmx, Alpine — A Complete Tutorial With A Demo Project And Comparison To Other Stacks

Exploring the AHA stack: Tutorial, demo, and comparison

The AHA stack — Astro, htmx, and Alpine — is a solid web development stack for smaller apps that emphasize frontend speed and SEO.

Oyinkansola Awosan
May 3, 2024 â‹… 13 min read
Comparing Hattip Vs Express Js For Modern Application Development

Comparing Hattip vs. Express.js for modern app development

Explore what Hattip is, how it works, its benefits and key features, and the differences between Hattip and Express.js.

Antonello Zanini
May 2, 2024 â‹… 8 min read
Using React Shepherd To Build A Site Tour

Using React Shepherd to build a site tour

React Shepherd stands out as a site tour library due to its elegant UI and out-of-the-box, easy-to-use React Context implementation.

Onuorah Bonaventure
May 1, 2024 â‹… 14 min read
A Guide To Cookies In Next Js

A guide to cookies in Next.js

Cookies are crucial to web development. This article will explore how to handle cookies in your Next.js applications.

Georgey V B
Apr 30, 2024 â‹… 10 min read
View all posts

3 Replies to "How to add Redis cache to a NestJS app"

  1. I am getting error.
    63 store?: string | CacheStoreFactory | CacheStore;
    ~~~~~
    The expected type comes from property ‘store’ which is declared here on type ‘CacheModuleOptions’

    1. instead “import * as redisStore from ‘cache-manager-redis-store’;”
      const redisStore = require(‘cache-manager-redis-store’).redisStore;


  2. //importing Get, Inject, Inject, and CACHE_MANAGER from nestjs/common
    import { Controller, Get, Inject, CACHE_MODULE } from ‘@nestjs/common’;

    The CACHE_MODULE here should be CACHE_MANAGER

Leave a Reply