From c64c0c05c7435e4f968c9e8fc923f49b15ee873b Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Wed, 28 Feb 2018 09:30:17 +1300 Subject: [PATCH] Update doc block for withCommon to indicate an array of strings, shorten serialized cache key --- src/Search/Variants/SearchVariant.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Search/Variants/SearchVariant.php b/src/Search/Variants/SearchVariant.php index 7214a3d..ea70abf 100644 --- a/src/Search/Variants/SearchVariant.php +++ b/src/Search/Variants/SearchVariant.php @@ -170,13 +170,13 @@ abstract class SearchVariant * Similar to {@link SearchVariant::with}, except will only use variants that apply to at least one of the classes * in the input array, where {@link SearchVariant::with} will run the query on the specific class you give it. * - * @param array $classes + * @param string[] $classes * @return SearchVariant_Caller */ public static function withCommon(array $classes = []) { // Allow caching - $cacheKey = serialize($classes); + $cacheKey = sha1(serialize($classes)); if (isset(self::$call_instances[$cacheKey])) { return self::$call_instances[$cacheKey]; }