Closed Ali1 closed 10 years ago
Not sure I agree with your null/false conditional changes. !$array
is more than adequate to check for non-empty arrays. There's even tests for it: https://github.com/titon/titon/blob/master/tests/titon/ExprBenchmarkTest.php#L151
I agree !$array
is adequate for non-empty arrays. The reason for the change is if one uses storeEmpty, then there is a chance that $results will be an empty array and this should be considered as a successful cache retrieval.
var_dump((bool) array()); // bool(false)
Hi. The latest commit is a separate issue. After some tests on CakePHP 2.4.3, it seem that a false return on the Behaviour afterSave stop the model afterSave from being called. Strange.
Forgot about this. Merged.
storyEmpty: if(!$results) is not adequate to detect empty arrays forceRefresh: not sure if you like this implementation which allows future options you may want to add.