Forums

WP internal Object Cache (not plugin) (2 posts)

  1. ioni
    Member
    Posted 2 years ago #

    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)

  2. ioni
    Member
    Posted 2 years ago #

    Found another thread on the matter, does not seem to resolve the problem
    http://wordpress.org/support/topic/309914

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags