mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-23 07:27:41 +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
|
||||
* @param {keyof typeof fuzzySearchCategories} [type] Optional cache type to clear. If not provided, clears all caches
|
||||
*/
|
||||
clearFuzzySearchCaches(type = null) {
|
||||
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)) {
|
||||
cache.resultMap.clear();
|
||||
}
|
||||
console.log('All fuzzy search caches cleared');
|
||||
clearFuzzySearchCaches() {
|
||||
for (const cache of Object.values(this.fuzzySearchCaches)) {
|
||||
cache.resultMap.clear();
|
||||
}
|
||||
console.log('All fuzzy search caches cleared');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user