11-28-2010, 04:09 AM
|
#2 (permalink)
|
|
Wizard
Join Date: Sep 2007
Posts: 1,298
Thanks: 17
|
Quote:
Originally Posted by nandananushil1
i have categories, sub-categories in my database from which i wan to make menu. total number of categories including sub-catgeories is 495 and sub-categories go to a depth of level 3.
i want to know which one will be faster and put less load on my server.
1. i use a function to generate menu every time page is loaded, so every time categories table needs to be crawled. right?
2. since i will update categories one in a while, so i use function to write them in a file in <ul><li> manner and use it as menu so that i don't have to use database
|
Caching like that will always be faster since it has to make less database calls.
|
|
|
|