Here is the code in an ajax php file. It checks the memcache to see if the results have already been stored, and then if not it looks them up in the DB. I have this code deployed on 2 identical servers. On one server it works fine, on the other it never finds anything in the cache. Thanks in advance.
$res = $_SESSION['memcache']->get($key);
if($res === false or sizeof($res)<1){
$res = $this->dbconn->fetch_json_grid_obj($sql,true,array("Curr Ext",
date("M Y",mktime(0,0,0,date('m')-1,1,date('Y')))." Ext"));
// cache until 7am
$_SESSION['memcache']->set($key, $res, 0, strtotime(date('Y-m-d
H:i:s',mktime(7,0,0,date('m'),date('d')+1,date('Y')))));
}
Very strange!