chart cache with memoize func