Item cache
All the performance benefits of a cache system when working with Items.
...
class Movie extends \Cherrycake\Item {
protected $tableName = "movies";
protected $loadFromIdMethod = "queryDatabaseCache";
protected $fields = [
"id" => [
"type" => \Cherrycake\DATABASE_FIELD_TYPE_INTEGER
],
"title" => [
"type" => \Cherrycake\DATABASE_FIELD_TYPE_STRING
],
"summary" => [
"type" => \Cherrycake\DATABASE_FIELD_TYPE_TEXT
],
"year" => [
"type" => \Cherrycake\DATABASE_FIELD_TYPE_YEAR
],
"imdbRating" => [
"type" => \Cherrycake\DATABASE_FIELD_TYPE_FLOAT
]
];
}Last updated