Adding caching for Statement struct.