brew-completions icon indicating copy to clipboard operation
brew-completions copied to clipboard

Implement caching

Open laughedelic opened this issue 6 years ago • 3 comments

All the __suggest_* functions use some output from brew and some of those commands are quite slow. It doesn't cache and every time you want to complete a formula name, it will run again.

  • [x] search if brew has some internal caching that could be used here
  • [ ] write some cache files in XDG paths? how/when to invalidate them?
  • [ ] can brew update be turned off on such commands? or can we hook to it to update the cache?

laughedelic avatar Aug 19 '17 19:08 laughedelic

Note: there's something in ~/Library/Caches/Homebrew/desc_cache.json

laughedelic avatar Aug 19 '17 20:08 laughedelic

It seems that desc_cache.json got deprecated, so the current cache lookup doesn't work now.

laughedelic avatar Sep 28 '18 17:09 laughedelic

Just thought I'd leave a comment here noting that ~/Library/Caches/Homebrew/descriptions.json that seems to contain formulae names and their descriptions. A quick search of Homebrew's repo suggest that it functions as a cache for Homebrew.

benedictleejh avatar Jun 12 '19 02:06 benedictleejh