which version is this cache_set function belong to?
That looks like the D6 cache_set().

Pressflow versions are API compatible with the Drupal versions. So if your site is D5, you should use Pressflow 5.

Mixing up Drupal 5 and Drupal 6 code is a recipe for disaster. So if you are doing this stop. Pressflow 5 cache.inc includes this...

function cache_set($cid, $table = 'cache', $data, $expire = CACHE_PERMANENT, $headers = array()) {
  $headers = serialize($headers);
  $created = $_SERVER['REQUEST_TIME'];
  db_query("UPDATE {". $table. "} SET data = %b, created = %d, expire = %d, headers = '%s' WHERE cid = '%s'", $data, $created, $expire, $headers, $cid);
  if (!db_affected_rows()) {
    @db_query("INSERT INTO {". $table. "} (cid, data, created, expire, headers) VALUES ('%s', %b, %d, %d, '%s')", $cid, $data, $created, $expire, $headers);
  }
}


This is probably what you should use.