/**
  * Creates the cache path if it doesn't exist, and returns the cache
  * directory. The $userId parameter is used to create multi-level directory names
  *
  * @params int $userId
  * @return string Cache directory for the user
  */
 static function getCacheDir($userId = 0)
 {
     $dir = eZSys::cacheDirectory() . '/user-info' . eZDir::createMultilevelPath($userId, 5);
     if (!is_dir($dir)) {
         eZDir::mkdir($dir, false, true);
     }
     return $dir;
 }