Fix api doc generation to allow caching.