add a test for cache&memoiz