diff --git a/build.xml b/build.xml
index 595ed1cc73131ccec9fad03eb7ce0cffec491083..0dc33074cf257d7f11be9ec436ed10a40f43d03f 100644
--- a/build.xml
+++ b/build.xml
@@ -158,6 +158,7 @@
         </if>
         <!-- Run phpdoc -->
         <mkdir dir="${builddir}/apidocs" />
+        <mkdir dir="${builddir}/docs_cache" />
         <!-- Old embedded version; no longer works correctly...
         <phpdoc2 title="VuFind API Documentation"
           pharlocation="${srcdir}/vendor/bin/phpDocumentor-${phpdoc_version}.phar"
@@ -167,7 +168,7 @@
           </fileset>
         </phpdoc2>
         -->
-        <exec command="php ${srcdir}/vendor/bin/phpDocumentor-${phpdoc_version}.phar --title=&quot;VuFind API Documentation&quot; -t ${builddir}/apidocs -d ${srcdir}/module" passthru="true" />
+        <exec command="php ${srcdir}/vendor/bin/phpDocumentor-${phpdoc_version}.phar --cache-folder=${builddir}/docs_cache --title=&quot;VuFind API Documentation&quot; -t ${builddir}/apidocs -d ${srcdir}/module" passthru="true" />
       </then>
     </if>
   </target>