You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getFromCache method in RedisQueryResultCache throws error since version-check
Expected Behavior
the new version of typeorm library should work with the new version-check in the getFromCache function.
Actual Behavior
Since the check of the redis-version being in place ( if (this.isRedis5OrHigher()) { ) this method throws an error when used in a nestjs application using typeorm.
Error thrown: TypeError: Cannot read properties of undefined (reading 'then') TypeError: Cannot read properties of undefined (reading 'then')
Seems the client.get function does not return a promise
Steps to reproduce
Use typeorm version 0.3.26 in a nestjs application with nestjs/typeorm
try to load a cached value via dataSource.queryResultCache.getFromCache
--> error is thrown
My Environment
Dependency
Version
Operating System
Node.js version
20
Typescript version
^5.2.2
TypeORM version
^0.3.20
Additional Context
No response
Relevant Database Driver(s)
aurora-mysql
aurora-postgres
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
spanner
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
No, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.
Activity
kafka0238 commentedon Sep 24, 2025
I also ran into this problem
StPaulis commentedon Nov 5, 2025
I have created a repository for reproduction purposes as I also felt on that issue after updating some projects on 0.3.26.
Hope that helps.
Currently, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.
fix: fix redis version detection logic
fix: fix redis version detection logic
fix: fix redis version detection logic
fix: fix redis version detection logic
fix: fix redis version detection logic