'Does next js implement a maximum cache size with an invalidation algorithm such as LRU?

I have a next js site that uses getServerSideProps. I would like to use getStaticProps and incremental static regeneration (ISR) instead for the performance advantages. My current memory use is about 125MB. Crawling all of the pages when using getStaticProps results in using around 2G of memory. I would like to fit the pages into 500Mb but I don't see anyway to set an upper limit on the cache used by getStaticProps.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source