Support » Networking WordPress » Multiste Purge Transients Per Site

  • Resolved Alex Phelps


    I have a bit of a complex scenario, I want to create a function to purge all transients for a single site within a multisite install using object-cache backend and HHVM.

    Currently I am able to do a cachedump to list all keys and then clear the keys as needed following Scott Taylors method here –

    $memcache = new Memcache();
    $memcache->connect( $server, '11211' );
    $list = array();
    $allSlabs = $memcache->getExtendedStats( 'slabs' );
    $items = $memcache->getExtendedStats( 'items' );
    foreach ( $allSlabs as $server => $slabs ) {
        foreach( $slabs as $slabId => $slabMeta ) {
            $cdump = $memcache->getExtendedStats( 'cachedump', (int) $slabId );
            foreach( $cdump as $keys => $arrVal ) {
                if ( !is_array( $arrVal ) ) continue;
                foreach( $arrVal as $k => $v ) {
                    $list[] = $k;

    Here is the catch, in HHVM cachedump has been removed, ref –

    Does anyone have any idea how to “Purge Transients Per Site” any other way?

    I feel like there is something I am missing, any advice?

Viewing 1 replies (of 1 total)
  • Alex Phelps


    The current work around is a fork of the Scotty T’s Johnny Cache plugin using PHP-FPM via an Nginx config and the rest of the site on HHVM.

Viewing 1 replies (of 1 total)
  • The topic ‘Multiste Purge Transients Per Site’ is closed to new replies.