PDA

View Full Version : Where are $usercache and $postache are defined


dayzman
04-02-2008, 03:08 PM
Hi,

Just a quick one: Does anyone know where $usercache and $postcache are defined? Thanks.

Michael

Opserty
04-02-2008, 03:17 PM
I haven't even heard of these variables, where are you accessing them from? Or what are you trying to do/figure out?

dayzman
04-02-2008, 05:23 PM
It's in function.php. It stores the results from SQL queries, but I want to see how the cache is managed, e.g., flushed. Thanks.

Michael

Opserty
04-02-2008, 06:09 PM
$usercache is a temporary variable which stores/caches data from fetched users. It means that if fetch_userinfo() is used to fetch the data of a user which has been previously fetched, then instead of querying the database, the cache is returned. I'm not sure why you want to know about this one, its just really to optimise the fetch_userinfo() (and others) function.

I presume $postcache is something similar. Unless someone else has other ideas.