First, we used two caches. Turns out that lru_cache wasn't needed, the
dict works perfectly fine on it's own.
Second, we now also cache local images, so that we don't have to read
them off the filesystem and convert them to base64 on every keystroke
Maybe there should be a maximum size on that cache dict, but I doubt
anyone would actually run into any trouble this cache taking too much
ram.