i tested again. yeah i tried that already it doesn't work.

Also my fix doesn't work. 

But this is working:

  $path = JPATH_ROOT."/cache/com_kunena";
  if (is_dir($path)) KunenaFolder::delete($path);
  
  $path2 = JPATH_ROOT."/cache/page";
  if (is_dir($path2)) KunenaFolder::delete($path2);