HEX
Server: Apache/2.4.63 (Unix)
System: Linux TOMS-220NAS 4.4.302+ #86009 SMP Wed Nov 26 18:19:17 CST 2025 x86_64
User: flavio87 (1026)
PHP: 8.3.27
Disabled: NONE
Upload Files
File: /volume1/web/tom-marchisa/wp-content/plugins/nextgen-gallery/src/WPCLI/Cache.php
<?php

namespace Imagely\NGG\WPCLI;

use Imagely\NGG\Util\Transient;

/**
 * WP-CLI Cache management commands for NextGEN Gallery.
 *
 * Provides cache-related WP-CLI commands for NextGEN Gallery.
 */
class Cache {

	/**
	 * Flushes NextGen Gallery caches
	 *
	 * @param array $args       Command arguments.
	 * @param array $assoc_args Associative arguments.
	 * @synopsis [--expired]
	 */
	public function flush( $args, $assoc_args ) {
		$expired = ! empty( $assoc_args['expired'] ) ? true : false;
		Transient::flush( $expired );
		\WP_CLI::success( 'Flushed caches' );
	}
}