Web disk cache: handle the Matte kind (mattes/ folder)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
4acea86d4f
commit
925760c9c8
@@ -404,7 +404,7 @@ export function frameWorkerStart(base, onMessage, gpu) {
|
||||
// ends in a checksum) and read the layer buffers they prefetch; the page lists, reads and
|
||||
// deletes.
|
||||
const CACHE_ROOT = "effectcraft-cache";
|
||||
const CACHE_KINDS = ["frames", "layers"];
|
||||
const CACHE_KINDS = ["frames", "layers", "mattes"];
|
||||
const cacheDirHandles = {};
|
||||
|
||||
async function cacheDir(kind = "frames") {
|
||||
@@ -419,6 +419,7 @@ async function cacheDir(kind = "frames") {
|
||||
/// The folder and file name of an entry name (`layers/<hex>.ecc` or `<hex>.ecc`).
|
||||
async function entryDir(name) {
|
||||
if (name.startsWith("layers/")) return [await cacheDir("layers"), name.slice(7)];
|
||||
if (name.startsWith("mattes/")) return [await cacheDir("mattes"), name.slice(7)];
|
||||
return [await cacheDir("frames"), name];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user