hors
hors copied to clipboard
Make two level cache
Level 1: user input -> answer
(When use input the same query, hors can make use of cache and return relative answer immediately)
NOTE: it's especially when user use zsh or git bash, which have 'reverse-i-search' feature, when user use it to search for historical hors command, it's easy to catch the cache. So the relative answer can return quickly. This is what howdoi does for now.
To make cache a little more clever, when we save query, we can remove any space and punction.
Level 2: page link -> stackoverflow answer (which is already implemented)