From ff11cdc931d8cb56d26712df8d2cf8f760698357 Mon Sep 17 00:00:00 2001
From: Stefan Kalscheuer <stefan@stklcode.de>
Date: Mon, 29 Aug 2016 10:34:13 +0200
Subject: [PATCH] Transient Statify data deleted after DB cleanup

---
 inc/statifyblacklist_admin.class.php | 3 +++
 views/settings_page.php              | 1 +
 2 files changed, 4 insertions(+)

diff --git a/inc/statifyblacklist_admin.class.php b/inc/statifyblacklist_admin.class.php
index dbc16a5..9771745 100644
--- a/inc/statifyblacklist_admin.class.php
+++ b/inc/statifyblacklist_admin.class.php
@@ -133,6 +133,9 @@ class StatifyBlacklist_Admin extends StatifyBlacklist {
 
 			/* Optimize DB */
 			$wpdb->query( "OPTIMIZE TABLE `$wpdb->statify`" );
+
+			/* Delete transient statify data */
+			delete_transient('statify_data');
 		}
 	}
 
diff --git a/views/settings_page.php b/views/settings_page.php
index d9dafce..1b51d08 100755
--- a/views/settings_page.php
+++ b/views/settings_page.php
@@ -76,6 +76,7 @@ if ( ! empty( $_POST['statifyblacklist'] ) ) {
 					<input type="checkbox" name="statifyblacklist[cron_referer]" id="statifyblacklist_cron_referer"
 					       value="1" <?php checked( StatifyBlacklist::$_options['cron_referer'], 1 ); ?> />
 					<?php esc_html_e( 'CronJob execution', 'statify-blacklist' ); ?>
+					<small>(<?php esc_html_e( 'Clean database periodically in background', 'statify-blacklist' ); ?>)</small>
 				</label>
 			</li>
 			<li>