MCPcopy Create free account
hub / github.com/error311/FileRise / canViewFolderCached

Function canViewFolderCached

public/js/folderManager.js:785–790  ·  view source on GitHub ↗
(folder)

Source from the content-addressed store, hash-verified

783// --- Capability cache so we don't spam /capabilities.php
784const _capViewCache = new Map();
785async function canViewFolderCached(folder) {
786 if (_capViewCache.has(folder)) return _capViewCache.get(folder);
787 const p = canViewFolder(folder).then(Boolean).catch(() => false);
788 _capViewCache.set(folder, p);
789 return p;
790}
791
792export function resetFolderTreeCaches() {
793 _folderCountCache.clear();

Callers 1

chooseInitialFolderFunction · 0.85

Calls 3

canViewFolderFunction · 0.85
setMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected