ClearSuggestionCache removes all entries from the keyword suggestion cache. Call this in tests to ensure a clean state between test cases, or after modifying the keyword list so that stale suggestions are not served.
()
| 113 | // Call this in tests to ensure a clean state between test cases, or after |
| 114 | // modifying the keyword list so that stale suggestions are not served. |
| 115 | func ClearSuggestionCache() { |
| 116 | suggestionCache.clear() |
| 117 | } |
| 118 | |
| 119 | // SuggestionCacheSize returns the number of entries currently held in the keyword |
| 120 | // suggestion cache. Use this for monitoring cache growth and deciding whether to |