mikecao / sparrow

A simple database toolkit for PHP
MIT License
289 stars 68 forks source link

Cache issue #11

Closed bstaint closed 10 years ago

bstaint commented 10 years ago

when set expire and $time() < $data['expire'] return null code line 1298:

if ($data['expire'] == 0) {
    return $data['value'];
}
else if (time() > $data['expire']) {
    $this->is_cached = false;
}

my patch:

if (($data['expire']  == 0) or (time() < $data['expire'])){
    return $data['value'];
}else{
    $this->is_cached = false;
}
mikecao commented 10 years ago

Thanks, this has been fixed in 34282ff3f11bdf9dce70e13c02ab1703b2af3db6.