objectcache: Use singleton cache in newAccelerator()
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 30 Oct 2015 22:22:44 +0000 (22:22 +0000)
committerKrinkle <krinklemail@gmail.com>
Fri, 30 Oct 2015 22:25:37 +0000 (22:25 +0000)
It was re-creating objects for each call.

This matches behaviour of newAnything().

Bug: T115729
Change-Id: If12aedae7f9f791eb8e233eb241c12efd2921762

includes/objectcache/ObjectCache.php

index 59c3c1f..3d14c33 100644 (file)
@@ -269,7 +269,7 @@ class ObjectCache {
                        }
                        $id = $fallback;
                }
-               return self::newFromId( $id );
+               return self::getInstance( $id );
        }
 
        /**