Ready to get started?Download WordPress


Is this object cached? (2 posts)

  1. imjscn
    Posted 3 years ago #

    I have some data of an object,generated by a class, saved as post meta.
    This is the class:

    Class OBJ{
    function get_data(){
    $meta_data = get_post_custom($id);
    $this->stuffs_1 = $meta_data[stuffs_1];
    $this->stuffs_2 = $meta_data[stuffs_2]; 
    function save_data(){
    if this , then, that ....

    In the template:
    $obj = new OBJ($id);
    Then, lots of functions are using $obj->stuffs.

    I understand WP's post meta are cached. But, is this $obj cached?
    if $obj is not cached, what else I should do?

  2. Read http://codex.wordpress.org/WordPress_Optimization/Caching

    Caching is done via plugins, not core.

Topic Closed

This topic has been closed to new replies.

About this Topic