Győztes a filerendszerbeli megoldás.
Filesystem:
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Server Software: | Apache/2.0.54 | ||
---|---|---|---|
Document Length: | 11089 bytes | ||
Concurrency Level: | 50 | ||
Time taken for tests: | 0.14537 seconds | ||
Complete requests: | 10000 | ||
Failed requests: | 0 | ||
Total transferred: | 113040000 bytes | ||
HTML transferred: | 110890000 bytes | ||
Requests per second: | 687.90 | ||
Transfer rate: | 7776.02 kb/s received | ||
Connnection Times (ms) | |||
min | avg | max | |
Connect: | 0 | 19 | 355 |
Processing: | 1 | 52 | 575 |
Total: | 1 | 71 | 930 |
<?
echo file_get_contents("cache.txt");
Adatbázis:
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Server Software: | Apache/2.0.54 | ||
---|---|---|---|
Document Length: | 11089 bytes | ||
Concurrency Level: | 50 | ||
Time taken for tests: | 0.28960 seconds | ||
Complete requests: | 10000 | ||
Failed requests: | 0 | ||
Total transferred: | 113040000 bytes | ||
HTML transferred: | 110890000 bytes | ||
Requests per second: | 345.30 | ||
Transfer rate: | 3903.31 kb/s received | ||
Connnection Times (ms) | |||
min | avg | max | |
Connect: | 0 | 1 | 57 |
Processing: | 1 | 143 | 1411 |
Total: | 1 | 144 | 1468 |
<?
mysql_connect("","user","pass");
mysql_select_db("test");
$qSQL = "SELECT `Value` FROM `cache` WHERE `Key` = '6ea9ab1baa0efb9e19094440c317e21b'";
echo mysql_result(mysql_query($qSQL),0,0);
Az adatbázis felépítése:
CREATE TABLE `cache` (
`Key` varchar(32) NOT NULL default '',
`Value` text NOT NULL,
PRIMARY KEY (`Key`)
) TYPE=MyISAM;