I have a function to instantiate a class to provide var access to other functions.
function my_data(){
global $post,$the_data;
$postid = get_the_ID();
$the_data = new MY_Class ( $postid );
return $the_data;
}
This function will be called by every post, and each post will call it many times whenever need a var from MY_Class. The data is saved in WordPress postmeta and retrived in My_Class. Does WP automatically cache the object, or should I find a way to cache it? How?