Support » Plugin: EM Object Cache » updated .. 2.1

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Vladimir Kolesnikov

    (@extrememember)

    Hi Danilo,

    I asked WP Support to rename the plugin in the repo but until then it has to be renamed manually.

    Of course I can modify all the paths in the code but this will break a lot of (unofficial) installations of the plugin.

    Reagrding cached queries: basically the plugin can cache everything (not only query results) but for this to work the other plugins should use WP Cache API (http://codex.wordpress.org/Class_Reference/WP_Object_Cache).

    In brief,

    $result = wp_cache_get($key, $group);
    if (false === $result) {
        // Do the heavy stuff: query DB etc
        // ...
    
        // Save the result to the cache
        wp_cache_set($key, $result, $group, $ttl);
    }

    $key is the ID of the data in the cache, $group is cache group (plugin name is a good idea to be used as a group name), $ttl is the time to keep the data in the cache.

    WordPress itself uses the Cache API that’s why you usually see performance improvements even if no other plugins use the API.

    Thread Starter Danilo

    (@dvorpahl)

    thanks. i saw you updated the plugin. good job.
    with the overview of cached queries i prefer something like the apc.php – you know?

    cu. danilo.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘updated .. 2.1’ is closed to new replies.