This needs to be switched to $cache($data)->set($data, CACHE_TEMPORARY) I believe. Tests are failing because cache_set() and cache_get() no longer exist.