Android: Disable in-memory cache of parsed cards

b4be50d26a7d7f324cb16d6aca9d55a310440eb6

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +3 -1Ignore whitespace
src/endpoints/characters.js+3 -1
@@ -24,6 +24,8 @@ const defaultAvatarPath = './public/img/ai4.png';
2424
2525// KV-store for parsed character data
2626const characterDataCache = new Map();
27+// Some Android devices require tighter memory management
28+const isAndroid = process.platform === 'android';
2729
2830/**
2931 * Reads the character card from the specified image file.
@@ -39,7 +41,7 @@ async function readCharacterData(inputFile, inputFormat = 'png') {
3941 }
4042
4143 const result = parse(inputFile, inputFormat);
4244 !isAndroid && characterDataCache.set(cacheKey, result);
4345 return result;
4446}
4547