Set up autocmds and cache update functions