diff --git a/package.json b/package.json index c0c00e5..460e7c4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@extollo/lib", - "version": "0.14.3", + "version": "0.14.4", "description": "The framework library that lifts up your code.", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/support/cache/RedisCache.ts b/src/support/cache/RedisCache.ts index 0f73c53..05936af 100644 --- a/src/support/cache/RedisCache.ts +++ b/src/support/cache/RedisCache.ts @@ -76,7 +76,7 @@ export class RedisCache extends Cache { await this.redis.multi() .tap(redis => redis.set(key, value)) .when(Boolean(expires), redis => { - const seconds = Math.round(((new Date()).getTime() - expires!.getTime()) / 1000) // eslint-disable-line @typescript-eslint/no-non-null-assertion + const seconds = Math.round((expires!.getTime() - (new Date()).getTime()) / 1000) // eslint-disable-line @typescript-eslint/no-non-null-assertion return redis.expire(key, seconds) }) .tap(pipeline => pipeline.exec())