bash: Add caching to dots completion script