MCPcopy Index your code
hub / github.com/MALSync/MALSync / clearCache

Function clearCache

src/utils/general.ts:892–904  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

890}
891
892export async function clearCache() {
893 const cacheObj = await api.storage.list();
894 let deleted = 0;
895
896 for (const key in cacheObj) {
897 if (!utils.syncRegex.test(key) && !/(^tagSettings\/.*)/.test(key)) {
898 api.storage.remove(key);
899 deleted++;
900 }
901 }
902
903 utils.flashm(`Cache Cleared [${deleted}]`);
904}
905
906export function sortAlphabetically(a, b) {
907 if (a.toLowerCase() < b.toLowerCase()) return -1;

Callers

nothing calls this directly

Calls 2

listMethod · 0.80
removeMethod · 0.80

Tested by

no test coverage detected