cphalcon icon indicating copy to clipboard operation
cphalcon copied to clipboard

NFR: cache for the aggregating Model methods

Open Vastly opened this issue 12 years ago • 1 comments

it would be great to have 'cache' functionality for the aggregate Model methods also. Or, if they are already in place, it would be good to mention them in the docs )). It is described here http://forum.phalconphp.com/discussion/2182/how-to-use-orm-cache-in-aggregate-methods-like-sum-count-etc- Shortly, 'count', 'sum', etc. model methods should be able to cache the resutls in exactly the same way as it works for 'find' and 'findAll', like this:

Items::count(["id<={$this->getId()}", 'cache' => ['lifetime' => 3600, 'key' => 'mykey']]);

Vastly avatar May 04 '14 12:05 Vastly

Fixed in #2640

ghost avatar Aug 20 '14 16:08 ghost