Added a simple cache to improve performance readily for benchmarks