Runtime caching to improve startup speed and allow for better cleanup