Monday, June 17, 2013

SaaS and AppController

I have an app I am working on and I was wondering if this is the designed behavior.   As usual my controllers extend AppController I use the beforeFilter() to determine the site the request is for and setup the environment widgets,auth etc.

My concern is if I put a mail() in the beforeFilter and call the app I get 9 emails for one request. So appcontroller -> beforeFilter is being called 9 times.  This is alot of overhead for a SaaS app. considering 4 queries are run so 36 queries total.... Is this the expected behavior and is there a better way to setting all the required settings etc. 


Thx 
Eric

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: