redis pt 1

This commit is contained in:
2026-03-30 17:55:39 +08:00
parent 4c1670c5af
commit c2bafc5bb1
6 changed files with 480 additions and 9 deletions

12
src/common/cache/cache.module.ts vendored Normal file
View File

@@ -0,0 +1,12 @@
import { Global, Module } from '@nestjs/common';
import { RedisModule } from '../../database/redis.module';
import { CacheService } from './cache.service';
import { RedisThrottlerStorage } from './redis-throttler.storage';
@Global()
@Module({
imports: [RedisModule],
providers: [CacheService, RedisThrottlerStorage],
exports: [CacheService, RedisThrottlerStorage],
})
export class CacheModule {}