Skip to content

pass redis config as-is to postgres cache

dakkar requested to merge feature/585-fix-redis-pg-caching into develop

What does this PR do?

the postgres data source constructor uses the redis configuration for its own cache; before this commit, it repeated some of the work already done by convertRedisOptions in config.ts, and also dropped any config option it was not expecting. Since the cache is implemented via ioredis (same as all other redis connections in this codebase), there is no good reason to restrict which config options can be passed.

With this, we pass the configuration as-is, which (for example) allows us to connect to redis via UNIX sockets instead of TCP sockets.

@june please test this on your setup!

aside on the RedisOptionsSource type: I couldn't find a good way to tell Typescript "we want either host&port, or path"; suggestions welcome.

Contribution Guidelines By submitting this merge request, you agree to follow our Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines
  • I have made sure to test this pull request

Merge request reports