dongwei4652 2016-10-31 20:39
浏览 23

too long

I have a advance cache system I use, and I store the results of a packet encoding inside a .dat file.

Example:

public function saveChunk($pk, $id){
    file_put_contents("cache/" . $id, serialize($pk));
}

This creates a .dat file which has the chunk encoding.

Anyways, this creates about 7000 .dat files, and it is very messy on my linux server.

Whats a good way I can have one file and assign a ID to each packet, and later retrieve the packet with the id? (It also needs to be speed efficient)

  • 写回答

0条回答 默认 最新

    报告相同问题?