Only cache if in Production

When adding or updating the docs in development, the caching means that you need to restart the App to get the updated version. This commit moves the caching to only happen in Production.