# solid-performance/1.3.0/src/Performance/Plugin/Deactivator.php

Solid Performance – Your No-Code Caching, Performance, &amp; Page Speed Solution, version 1.3.0. 64 lines.

- Page: https://pluginprobe.com/plugins/solid-performance/1.3.0/code/src/Performance/Plugin/Deactivator.php
- Raw: https://pluginprobe.com/plugins/solid-performance/1.3.0/raw/src/Performance/Plugin/Deactivator.php
- Modified: 2024-09-03T15:51:20+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/solid-performance/1.3.0/code/src/Performance/Plugin/Deactivator.php#L10-L20`.

```php
<?php
/**
 * All functionality related to deactivating the plugin.
 *
 * @since 0.1.0
 *
 * @package SolidWP\Performance
 */

declare( strict_types=1 );

namespace SolidWP\Performance\Plugin;

use SolidWP\Performance\Config\Advanced_Cache;
use SolidWP\Performance\Container;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Handles actions that should run when the plugin is deactivated.
 *
 * @since 0.1.0
 *
 * @package SolidWP\Performance
 */
final class Deactivator {

	/**
	 * @var Container
	 */
	private Container $container;

	/**
	 * @param  Container $container The container.
	 */
	public function __construct( Container $container ) {
		$this->container = $container;
	}

	/**
	 * Deactivation hook.
	 *
	 * @since 0.1.0
	 *
	 * @return void
	 */
	public function __invoke(): void {
		$this->remove_advanced_cache();
	}

	/**
	 * Remove the generated advanced-cache.php drop-in.
	 *
	 * @since 0.1.0
	 *
	 * @return void
	 */
	private function remove_advanced_cache(): void {
		$this->container->get( Advanced_Cache::class )->remove();
	}
}

```
