Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CacheModule.register() missing type for store property for redisStore #179

Closed
3 of 4 tasks
NaveenAtPrima opened this issue Oct 16, 2023 · 1 comment
Closed
3 of 4 tasks
Labels
bug Something isn't working

Comments

@NaveenAtPrima
Copy link

NaveenAtPrima commented Oct 16, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

As per documentation , for using the redis store with CacheModule ( exported from @nestjs/cache-manager) , we provide the value for store manually i.e. redisStore ( exported from cache-maanger-redis-store), but there's no type "Store" present in CacheMangerOptions property of CacheModule.register() method . "Store" is the property exported from 'cache-manager" in redisStore.

CacheModule.register<RedisClientOptions>({ store: redisStore, host: 'localhost', // Redis server host port: 6379, // Redis server port }),

Current interface for CacheMangerOptions

`export interface CacheManagerOptions {
store?: string | CacheStoreFactory | CacheStore;
ttl?: number;
max?: number;
isCacheableValue?: (value: any) => boolean;

}`

Minimum reproduction code

https://github.com/no91one/nestjs-redis.git

Steps to reproduce

npm i
nest start --watch

Expected behavior

export interface CacheManagerOptions {
store?: string | CacheStoreFactory | CacheStore | Store;
host?:string;
port?:number;
ttl?: number;
max?: number;
isCacheableValue?: (value: any) => boolean;
}

Package version

2.1.0

NestJS version

10.0.0

Node.js version

18.16.1

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

@NaveenAtPrima NaveenAtPrima added the bug Something isn't working label Oct 16, 2023
@kamilmysliwiec
Copy link
Member

Please, use our Discord channel (support) for such questions. We are using GitHub to track bugs, feature requests, and potential improvements.

@nestjs nestjs locked and limited conversation to collaborators Oct 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants