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:

Rxjs Adoption Guide: Overview, Examples, And Alternatives

RxJS adoption guide: Overview, examples, and alternatives

Get to know RxJS features, benefits, and more to help you understand what it is, how it works, and why you should use it.

Emmanuel Odioko
Jul 26, 2024 â‹… 13 min read
Decoupling Monoliths Into Microservices With Feature Flags

Decoupling monoliths into microservices with feature flags

Explore how to effectively break down a monolithic application into microservices using feature flags and Flagsmith.

Kayode Adeniyi
Jul 25, 2024 â‹… 10 min read
Lots of multi-colored blue and purplish rectangles.

Animating dialog and popover elements with CSS @starting-style

Native dialog and popover elements have their own well-defined roles in modern-day frontend web development. Dialog elements are known to […]

Rahul Chhodde
Jul 24, 2024 â‹… 10 min read
Using Llama Index To Add Personal Data To Large Language Models

Using LlamaIndex to add personal data to LLMs

LlamaIndex provides tools for ingesting, processing, and implementing complex query workflows that combine data access with LLM prompting.

Ukeje Goodness
Jul 23, 2024 â‹… 5 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