electron-userland / electron-spellchecker

Implement spellchecking, correctly
MIT License
238 stars 83 forks source link

Increase LRU cache size to prevent thrashing, invalidate on "learn word" #137

Closed bengotow closed 5 years ago

bengotow commented 5 years ago

Fixes #136

I'm not sure what the motivation for the 4s invalidation time in the LRU cache was. My best guess is that it was necessary to make the "learn spelling" feature work, so instead of re-querying every 4 seconds I made addToDictionary reset the cache. I also made sure the cache is reset when you switch languages on macOS (this may have actually been a bug?)

felixrieseberg commented 5 years ago

Sounds pretty good, even if I'm very late