Skip to content

Commit

Permalink
fix: 🚑 resolve double stringify (#991)
Browse files Browse the repository at this point in the history
* fix: 🚑 there was a double stringify as well

* improve: removed extra log throw

* chore: enforce EOL
  • Loading branch information
james-a-morris authored Oct 12, 2023
1 parent f36628f commit c75b5f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ dump.rdb*
cache
artifacts
dist

# Debugging files
*.log
2 changes: 1 addition & 1 deletion src/caching/RedisCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class RedisCache implements interfaces.CachingMechanismInterface {

public async set<T>(key: string, value: T, ttl: number = constants.DEFAULT_CACHING_TTL): Promise<string | undefined> {
// Call the setRedisKey function to set the value in redis.
await setRedisKey(key, JSON.stringify(value), this.redisClient, ttl);
await setRedisKey(key, String(value), this.redisClient, ttl);
// Return key to indicate that the value was set successfully.
return key;
}
Expand Down

0 comments on commit c75b5f6

Please sign in to comment.