lru_cache with TLE issue.
fix TLE issue.