CREATE TABLE todo (id INTEGER PRIMARY KEY AUTOINCREMENT, task char(100) NOT NULL, status bool NOT NULL);
INSERT INTO todo (task,status) VALUES ('Read A-byte-of-python to get a good introduction into Python',0);
INSERT INTO todo (task,status) VALUES ('Visit the Python website',1);
INSERT INTO todo (task,status) VALUES ('Test various editors for and check the syntax highlighting',1);
INSERT INTO todo (task,status) VALUES ('Choose your favorite WSGI-Framework',0);
$result = Debtor::getDb()->cache(function ($db) {
return Debtor::find()->where(['id' => 87])->one();
}, 120);
var_dump($result->flags);
public static function testCache() {
$result = static::getDb()->cache(function ($db) {
return static::find()->where(['id' => 87])->one();
}, 120);
return $result;
}