powerhouse-inc / document-drive

GNU Affero General Public License v3.0
1 stars 0 forks source link

Cache rework #235

Open CallmeT-ty opened 2 months ago

CallmeT-ty commented 2 months ago

All read requests should hit cache and only fallback to db + calculation if cache misses. This includes the listener state and unread strands.

Ideally, cache and db would have the same API, providing two layers of “caching”, abstracted from the caller.

Since operations are append-only, we should fetch the operations on cache and then only fetch from db operations with an higher index.

Write operations should go directly to the db layer and update the cache when finished.

Tasks: