Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Phalcon Model Behavior - why isn't notify() emitted on afterFetch?

Hi all,

Got a question about the behaviour of Phalcon Model Behaviors:

Is there a specific reason why Phalcon\Mvc\Model\Behavior::notify() is not emitted with "afterFetch" event type?



Emit events to an events manager for every record fetch could make the app very slow.

Maybe instead of event manager use beanstalkd, queue, cron and Cli task? After fetch you can simply put the job to queue and do it in cli task instead of using event manager.

edited Feb '16


So it was implemented in 2.1. Does it mean the app is going to be "very slow" ?