8000 Tags · livepeer/studio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Tags: livepeer/studio

Tags

v0.16.0

Toggle v0.16.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
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>
0