First go at a solution for caching a matrix inverse