@takentrade/takentrade-libs 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -21,4 +21,5 @@ export declare class CacheService implements OnModuleInit, OnModuleDestroy {
|
|
|
21
21
|
hget(key: string, field: string): Promise<string | null>;
|
|
22
22
|
hgetall(key: string): Promise<Record<string, string>>;
|
|
23
23
|
hdel(key: string, field: string): Promise<void>;
|
|
24
|
+
expire(key: string, ttlSeconds: number): Promise<void>;
|
|
24
25
|
}
|
|
@@ -83,6 +83,9 @@ let CacheService = class CacheService {
|
|
|
83
83
|
async hdel(key, field) {
|
|
84
84
|
await this.redisClient.hdel(key, field);
|
|
85
85
|
}
|
|
86
|
+
async expire(key, ttlSeconds) {
|
|
87
|
+
await this.redisClient.expire(key, ttlSeconds);
|
|
88
|
+
}
|
|
86
89
|
};
|
|
87
90
|
exports.CacheService = CacheService;
|
|
88
91
|
exports.CacheService = CacheService = __decorate([
|