-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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>
- Loading branch information
1 parent
033cc2c
commit 70bdda2
Showing
14 changed files
with
195 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.