File scripts/cache.php changed (mode: 100644) (index 6acc008..7865345) |
1 |
1 |
<?php |
<?php |
2 |
2 |
// This is called by cron, and is persistent. |
// This is called by cron, and is persistent. |
3 |
|
// It takes care fast caching, like memcache. |
|
|
3 |
|
// It takes care of fast caching, like memcache. |
4 |
4 |
// It will receive signals using a UNIX socket. |
// It will receive signals using a UNIX socket. |
5 |
5 |
error_reporting(E_ALL); |
error_reporting(E_ALL); |
6 |
6 |
ini_set("track_errors", "On"); |
ini_set("track_errors", "On"); |
|
... |
... |
if ($r === FALSE) { |
327 |
327 |
$conn_table = array("r" => array(), "w" => array(), "conns" => array()); |
$conn_table = array("r" => array(), "w" => array(), "conns" => array()); |
328 |
328 |
$conn_table['r']['master'] = $master; |
$conn_table['r']['master'] = $master; |
329 |
329 |
do { |
do { |
330 |
|
$new_ver = file_get_contents(__FILE__); |
|
331 |
|
$new_ver = preg_match("/rg_cache_version = (.*);/", $new_ver, $matches); |
|
332 |
|
$new_ver = $matches[1]; |
|
333 |
|
if ($rg_cache_version != $new_ver) { |
|
334 |
|
rg_log("Version upgraded. Exiting..."); |
|
335 |
|
break; |
|
336 |
|
} |
|
337 |
|
|
|
338 |
330 |
rg_log_buffer_clear(); |
rg_log_buffer_clear(); |
339 |
331 |
|
|
340 |
332 |
$r2 = $conn_table['r']; $w2 = $conn_table['w']; $ex = array(); |
$r2 = $conn_table['r']; $w2 = $conn_table['w']; $ex = array(); |