title: Caching functions in python
body: <p>Are there any built in ways in python 3 to cache functions that have no side effects? Or maybe it's already done automatically? If so, are there any ways to save cache when program is closed?</p>