mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
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
|
||||
* 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];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user