Check cache only when purge-cache is off (#10031)
Check cache only when purge-cache is off (#10031)

Co-authored-by: fisker Cheung <c7e5eb375c44f84a4c70ec3f9a94e81f662bb7f8@gmail.com>
prettier/prettier,jlongster/prettier,rattrayalex/prettier,rattrayalex/prettier,prettier/prettier,rattrayalex/prettier,prettier/prettier,prettier/prettier