$backend->
set('test2', 2
);
$backend->
set('test3', 2
);
$backend->
set('test4', 2
);
$reference =
['test1', 'test2', 'test3', 'test4'
];
$cids =
$reference;
$ret =
$backend->
getMultiple($cids);
$this->
assertCount(4,
$ret, 'Four items returned.'
);
$backend->
invalidate('test1'
);
$backend->
invalidateMultiple(['test2', 'test3'
]);
$cids =
$reference;
$ret =
$backend->
getMultiple($cids);
$this->
assertCount(1,
$ret, 'Only one item element returned.'
);
$cids =
$reference;
$ret =
$backend->
getMultiple($cids, TRUE
);
$this->
assertCount(4,
$ret, 'Four items returned.'
);
// Calling invalidateMultiple() with an empty array should not cause an
// error.