Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hi all,
I'm doing some profiling of a site using homebox, and noticed that homebox_get_page is firing multiple times on the same page and running the following query repeatedly. It seems like a perfect candidate for static caching. Is there something I'm missing or can we easily add a static variable here?
Thanks!
*/
function homebox_get_page($name) {
// Fetch page from db
$page = db_fetch_object(db_query("SELECT * FROM {homebox_pages} WHERE name = '%s'", $name));
Comments
Comment #1
drumm+1
Same for the user page.
Comment #2
nnewton CreditAttribution: nnewton commentedJust to be clearer, I mention static caching in the original issue...but it seems like this would be a good candidate for cache_get/set as well. Especially as if name is empty, this is read as impossible by mysql which is quite fast but also doesn't get into the query cache.
-N
Comment #3
mstef CreditAttribution: mstef commentedI'm not sure if I see how static caching could even be possible or useful with a module like this.
Comment #4
drummMerged into #874790: Configurable blocks