Multiste Purge Transients Per Site
-
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 – https://scotty-t.com/2012/01/20/wordpress-memcached/$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 – https://docs.hhvm.com/manual/en/memcache.getextendedstats.phpDoes 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)
Viewing 1 replies (of 1 total)
- The topic ‘Multiste Purge Transients Per Site’ is closed to new replies.