Make sure caches for the 2 demos do not override each other

This commit is contained in:
Alessandro Pignotti 2024-10-15 16:34:31 +02:00
parent 8adc03ac8f
commit 9962e2ce43
3 changed files with 4 additions and 3 deletions

View file

@ -15,6 +15,7 @@
export let configObj = null;
export let processCallback = null;
export let cacheId = null;
var term = new Terminal({cursorBlink:true, convertEol:true, fontFamily:"monospace", fontWeight: 400, fontWeightBold: 700});
var cx = null;
@ -124,7 +125,7 @@
default:
throw new Error("Unrecognized device type");
}
var overlayDevice = await CheerpX.OverlayDevice.create(blockDevice, await CheerpX.IDBDevice.create("block1"));
var overlayDevice = await CheerpX.OverlayDevice.create(blockDevice, await CheerpX.IDBDevice.create(cacheId));
var webDevice = await CheerpX.WebDevice.create("");
var dataDevice = await CheerpX.DataDevice.create();
var mountPoints = [

View file

@ -11,4 +11,4 @@ function handleProcessCreated(processCount)
}
</script>
<WebVM configObj={configObj} processCallback={handleProcessCreated} />
<WebVM configObj={configObj} processCallback={handleProcessCreated} cacheId="blocks_terminal" />

View file

@ -11,4 +11,4 @@ function handleProcessCreated(processCount)
}
</script>
<WebVM configObj={configObj} processCallback={handleProcessCreated} />
<WebVM configObj={configObj} processCallback={handleProcessCreated} cacheId="blocks_alpine" />