File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -222,8 +222,12 @@ private function getDoctrineAnnotationReader(): Reader
222222 AnnotationRegistry::registerLoader ('class_exists ' );
223223 $ doctrineAnnotationReader = new DoctrineAnnotationReader ();
224224
225- $ cacheDir = $ this ->annotationCacheDir ?? sys_get_temp_dir ();
226- $ cache = function_exists ('apcu_fetch ' ) ? new ApcuCache () : new PhpFileCache ($ cacheDir . '/graphqlite. ' . crc32 (__DIR__ ));
225+ if (function_exists ('apcu_enabled ' ) && apcu_enabled ()) {
226+ $ cache = new ApcuCache ();
227+ } else {
228+ $ cacheDir = $ this ->annotationCacheDir ?? sys_get_temp_dir ();
229+ $ cache = new PhpFileCache ($ cacheDir . '/graphqlite. ' . crc32 (__DIR__ ));
230+ }
227231
228232 $ cache ->setNamespace ($ this ->cacheNamespace );
229233
You can’t perform that action at this time.
0 commit comments