What I Learned This Summer

Published on Sep 7, 2012 by Jamie Munro

Well – it's Friday and all of the kids are back in school.  While this post is being published, I'm probably stuck in traffic!  I can't believe it's a new school year already, luckily my kids aren't old enough so it's just traffic that I need to get used to.

This has been a great summer so far and I thought it would be a good idea to summarize the variety of things I've learned about – but have not necessarily blogged about…

Read more >

Tags: Optimization | php | cache | ASP.NET | Theory | PHP | CakePHP

Caching Queries in CakePHP

Published on Apr 25, 2009 by Jamie Munro

If you haven't noticed already, at times CakePHP can be a little slow loading!  The reason for this is quite simple.  Rapid Application Development.  To allow for RAD, sometimes we must give up something, in this scenario it's a bit of speed when loading.  Don't worry, CakePHP offers some excellent utilities to help with this.

The one I will focus on today is caching our CakePHP query results.  The key to this is, we are caching the results, not the queries themselves.  If you know databases well, you may be thinking, "why do I want to cache queries, doesn't my database server do this already?"  The answer to the question is, yes it does.  However, CakePHP still needs to call the database query and parse your results.  What I'm proposing, will avoid both of those steps and allow you to just retrieve the results.

This process not only avoids excess load on the database, it also reduces PHP's processing time that CakePHP has to do to provide you with such useful arrays.

Read more >

Tags: CakePHP | Optimization | cache | find()