mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-23 15:37:50 +01:00
Remove unnecesary key only clearing for cache clearing
This commit is contained in:
parent
1395c0b8c6
commit
309157dd89
@ -443,17 +443,11 @@ export class FilterHelper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears fuzzy search caches
|
* Clears fuzzy search caches
|
||||||
* @param {keyof typeof fuzzySearchCategories} [type] Optional cache type to clear. If not provided, clears all caches
|
|
||||||
*/
|
*/
|
||||||
clearFuzzySearchCaches(type = null) {
|
clearFuzzySearchCaches() {
|
||||||
if (type && this.fuzzySearchCaches[type]) {
|
|
||||||
this.fuzzySearchCaches[type].resultMap.clear();
|
|
||||||
console.log(`Fuzzy search cache cleared for: ${type}`);
|
|
||||||
} else {
|
|
||||||
for (const cache of Object.values(this.fuzzySearchCaches)) {
|
for (const cache of Object.values(this.fuzzySearchCaches)) {
|
||||||
cache.resultMap.clear();
|
cache.resultMap.clear();
|
||||||
}
|
}
|
||||||
console.log('All fuzzy search caches cleared');
|
console.log('All fuzzy search caches cleared');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user