By default if you set the debug to 0 in your core.php the frequency of executing a describe query is 999 days, but if your developing your application the duration is 10 sections, meaning every 10 sections it would ask your database to describe the tables that you need in your controller. To change the 10 sections to a higher value you could do this.
open configure.php in cake/libs/
locate the function __loadBootstrap
inside this function locate the following
if (Configure::read() >= 1) {
$duration = '+10 seconds';
} else {
$duration = '+999 days';
}
Change the ‘+10 seconds’ according to your requirement, say you want to describe a query every 1 minute, you would change it to
if (Configure::read() >= 1) {
$duration = '+1 minute';
} else {
$duration = '+999 days';
}
Thank you. SO. MUCH. FOR. THIS.
Describe queries are by far the longest part of cakePHP runtime.
Comment by Y-Love — November 27, 2008 @ 5:33 am
Thanks a lot buddy.. I’ve been looking so long for this solution but there is nothing related to this in the cake book.
Comment by Adnan — January 4, 2010 @ 7:19 pm
Seconds, not sections, but yeah! Thanks!
Comment by Simón — May 17, 2010 @ 5:41 am