Add MemoizedCallable for APC-backed function memoization
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoaderFileModule.php
index 5d762d8..0e53547 100644 (file)
@@ -924,9 +924,8 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                                $this->missingLocalFileRefs[] = $file;
                        }
                }
-               return CSSMin::remap(
-                       $style, $localDir, $remoteDir, true
-               );
+               return MemoizedCallable::call( 'CSSMin::remap',
+                       array( $style, $localDir, $remoteDir, true ) );
        }
 
        /**
@@ -980,7 +979,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                if ( isset( $cachedCompile['hash'] ) ) {
                        $contentHash = FileContentsHasher::getFileContentsHash( $cachedCompile['files'] );
                        if ( $contentHash === $cachedCompile['hash'] ) {
-                               $this->localFileRefs += $cachedCompile['files'];
+                               $this->localFileRefs = array_merge( $this->localFileRefs, $cachedCompile['files'] );
                                return $cachedCompile['css'];
                        }
                }