Skip to content

Capf-Buster - Cache busting

The Capf-Buster ensures that you always get a fresh set of candidates!

If a Capf caches the candidates for too long we can use a cache busting Capf-transformer. For example the Capf merging function cape-capf-super creates a Capf, which caches the candidates for the whole lifetime of the Capf. Therefore you may want to combine a merged Capf with a cache buster under some circumstances. It is noteworthy that the company-capf backend from Company refreshes the completion table frequently. With the cape-capf-buster we can achieve a similarly refreshing strategy.

emacs-lisp
(setq-local completion-at-point-functions
            (list (cape-capf-buster #'some-caching-capf)))