Improve batch caching implementation in ImperativeRenderer (it now uses a 4-element LRU cache instead of caching the most recent batch)