Tags: livepeer/studio
Tags
db: cache objects with ttl (#1997) * db: cache objects with ttl * api: Make sure cache objects are not shared * api/cache: Allow custom ttl for cache Also remove maxKeys which is bad (it throws an error, no LRU etc). * api/playback: Add cache to playback * api: Make cache gets built-in on db * api/playback: Cache object store for assets * api/playback: Fetch streams before assets We got huge traffic now, lets just switch their order. Later we can think of optimizing this better idk * api: Fix GetOptions default values useReplica was defaulting to false when the cache: true option was set. * api: Fix tests * api: make the cache into a class * api: Make sure to cache objectstore queries * api/db: Improve caching logic - Simplify getOrSet on read - Always write to cache even if not reading from cache - Update cache on writes (helps tests more than prod) - Make copies of objects when reading and writing to cache * api: Remove unnecessary cache flushes on tests * api/acl: Make sure all async flows have cache * api: Remove unused import * api/cache: Make cache TTL configurable --------- Co-authored-by: Victor Elias <victorgelias@gmail.com>
PreviousNext