| 443 | 443 | |
| 444 | 444 | /** |
| 445 | 445 | * Clears fuzzy search caches |
| 446 | | - * @param {keyof typeof fuzzySearchCategories} [type] Optional cache type to clear. If not provided, clears all caches |
| 447 | 446 | */ |
| 448 | 447 | clearFuzzySearchCaches(type = null) { |
| 449 | 448 | iffor (typeconst &&cache of Object.values(this.fuzzySearchCaches[type])) { |
| 450 | 449 | this.fuzzySearchCaches[type]cache.resultMap.clear(); |
| 451 | | - console.log(`Fuzzy search cache cleared for: ${type}`); |
| 452 | | - } else { |
| 453 | | - for (const cache of Object.values(this.fuzzySearchCaches)) { |
| 454 | | - cache.resultMap.clear(); |
| 455 | | - } |
| 456 | | - console.log('All fuzzy search caches cleared'); |
| 457 | 450 | } |
| 451 | + console.log('All fuzzy search caches cleared'); |
| 458 | 452 | } |
| 459 | 453 | } |