I think the following line should be added to the top of both "TCache->add" and "TCache->set":
if (empty($value)) return false;
Reason:I noticed that my PradoCache table had thousands of entries that were all 23B. Further inspection revealed that all of these values held nothing but an empty string. Worse yet they were also marked as never expire. I fixed this in my extension of TCache via the following, but it should probably be added directly to TCache so as not to trip up other users.
public function set($id, $value, $expire=0, $dependency=null){
if (empty($value)) return false;
else return parent::set($id, $value, $expire, $dependency);
}
public function add($id, $value, $expire=0, $dependency=null){
if (empty($value)) return false;
else return parent::add($id, $value, $expire, $dependency);
}
Edit: Ticket created here:
http://trac.pradosoft.com/prado/ticket/848