I have a recursive category overview. Example:

Category 1
 *  Category 1.1
 *  Category 1.2
 *  Category 1.3
Category 2
Category 3
 *  Category 3.1
 *  Category 3.2

I also created a function in CategoryPeer.class.php named
"generateSelect". The output of this function is going to be:
<select>
  <option value="[id]">Category 1</option>
  <option value="[id]">-- Category 1.1</option>
  <option value="[id]">-- Category 1.2</option>
  <option value="[id]">-- Category 1.3</option>
  <option value="[id]">Category 2</option>
  [etc]
</select>

My problem is that every time I use that select box, 9 queries are
being executed. One for the retrieval of the main categories and then
for every category to check if there are subcategories. I don't want
all these queries to be executed every time.

So, is it possible to cache the return value of this Peer function?
That the output will only be renewed every hour?
How do I do that?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to