Seems I am lost.
So, how to cache a Phalcon\Mvc\Model\Resultset\Simple query?
If I have something like this:
return new Simple(null, $this, $this->getReadConnection()->query($sql));
# and when I pass the cache object (although I am not sure what it does)
return new Simple(null, $this, $this->getReadConnection()->query($sql), $this->getDI()->get('cache'));
What actually happens when I pass the cache object and how can I name/get it later?
If I try to save the above return to a cache in controller, I get
Object of class Phalcon\Mvc\Model\Resultset\Simple could not be converted to string
Which seems right as there is no magic method. So, can it be cached from controller at all or how to do it?