# sqlite-object-cache/1.6.0/uninstall.php

SQLite Object Cache, version 1.6.0. 26 lines.

- Page: https://pluginprobe.com/plugins/sqlite-object-cache/1.6.0/code/uninstall.php
- Raw: https://pluginprobe.com/plugins/sqlite-object-cache/1.6.0/raw/uninstall.php
- Modified: 2025-10-08T21:09:46+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/sqlite-object-cache/1.6.0/code/uninstall.php#L10-L20`.

```php
<?php
/**
 * This file runs when the plugin in uninstalled (deleted).
 *
 * @package SQLite Object Cache.
 */

// If plugin is not being uninstalled, exit (do nothing).
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
	exit;
}
if ( is_multisite() ) {
foreach ( get_sites( array( 'number' => 0, 'fields' => 'ids', 'no_found_rows' => true, 'orderby' => false ) ) as $site_id ) {
    try {
      switch_to_blog( $site_id );
      delete_option( 'sqlite_object_cache_settings' );
      delete_option( 'sqlite_object_cache_version' );
    } catch ( Exception $ex ) {
      /* Avoid crashes on transient clearing */
      error_log( 'SQLite Object Cache problem removing blog options. Blog ' . $site_id . ':' . $ex->getMessage() );
    } finally {
      restore_current_blog();
    }
  }
}

```
