Support » Fixing WordPress » WP internal Object Cache (not plugin)

  • Hi there,

    I am running WordPress 2.8.5 (on Hostgator, sometimes it seems to be important!)

    I have the following defined in wp-config.php

    // caching
    define ('ENABLE_CACHE',true);
    define ('WP_CACHE', true);

    I do have the folder “cache” under ‘wp-content’ (and it is chmod 644, the highest the hosting allows, but the processes are run as ‘owner’, so it is not the permissions issue)

    And I do have the following code in my pages:

    $mycache = wp_cache_get( 'mycache' );
    if ($mycache == false) {
    	$mycache = "this is mycache variable";
    	$expire=60*30; // 60 seconds by 30 minutes
    	wp_cache_set( 'mycache', $mycache ,'faces', $expire);
    } else {
    	// the cache has worked
    	var_dump( $mycache );
    }

    And nothing happens. SO my question is – how does the WP Object cache operates? Can I use it in amy other way (for I am retrieveing remote pages and it is overly time consuming – and the retrieved pages do not change very often anyway)

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘WP internal Object Cache (not plugin)’ is closed to new replies.