Update doc block for withCommon to indicate an array of strings, shorten serialized cache key
This commit is contained in:
parent
31991858ef
commit
c64c0c05c7
|
@ -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
|
* 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.
|
* 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
|
* @return SearchVariant_Caller
|
||||||
*/
|
*/
|
||||||
public static function withCommon(array $classes = [])
|
public static function withCommon(array $classes = [])
|
||||||
{
|
{
|
||||||
// Allow caching
|
// Allow caching
|
||||||
$cacheKey = serialize($classes);
|
$cacheKey = sha1(serialize($classes));
|
||||||
if (isset(self::$call_instances[$cacheKey])) {
|
if (isset(self::$call_instances[$cacheKey])) {
|
||||||
return self::$call_instances[$cacheKey];
|
return self::$call_instances[$cacheKey];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue