mirror of
https://github.com/HeyPuter/puter.git
synced 2026-01-07 05:30:31 -06:00
perf: add 30 second app cache
There used to be an app cache here that would be invalidated but I think this may have been removed because the invalidation logic was causing issues. A 30 second cache seems reasonable though, so let's do that for now.
This commit is contained in:
@@ -365,6 +365,10 @@ async function refresh_associations_cache(){
|
||||
app = app && app[0] ? app[0] : null;
|
||||
|
||||
if ( app === null ) return null;
|
||||
|
||||
kv.set(`apps:uid:${app.uid}`, app, { EX: 30 });
|
||||
kv.set(`apps:name:${app.name}`, app, { EX: 30 });
|
||||
kv.set(`apps:id:${app.id}`, app, { EX: 30 });
|
||||
|
||||
// shallow clone because we use the `delete` operator
|
||||
// and it corrupts the cache otherwise
|
||||
|
||||
Reference in New Issue
Block a user