Key/value with redis, but why not with other db?

As I understand, postgresql is also able to do this Job.
And admins have one technology fewer to administrate.

We use redis as a caching layer where it does act as an in-memory cache rather than a fully persisted key-value storage. I don’t think Postgres provides a way to avoid persisting the values to disk and would be therefore not be a suitable caching solution.

1 Like

An answer from pg-forum.de:

key-value geht via HSTORE-Extension. Wenn es okay ist, daß nach einem Crash der DB die Tabelle leer ist, kann man sie als unlogged erstellen. Damit werden Änderungen der Tabelle nicht im WAL gespeichert, dafür ist es aber deutlich schneller. Da Änderungen nicht im WAL sind, können solche Tabellen auch nicht repliziert werden.

Patches are always welcome :wink:

The database abstraction layer used by Nextcloud is Doctrine and does not support HSTORE afaik. You can probably reuse a existing database connection and raw sql queries to read/write to HSTORE.

Happy hacking :robot: