Consider to use LRU cache or other better algorithm to replace MAX_CACHE_SIZE dict to avoid clear cache when the cache length achive to MAX_CACHE_SIZE