$41 GRAYBYTE WORDPRESS FILE MANAGER $67

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/var/softaculous/sitepad/editor/site-data/plugins/speedycache-pro/main/

HOME
Current File : /var/softaculous/sitepad/editor/site-data/plugins/speedycache-pro/main//db.php
<?php
/*
* SPEEDYCACHE
* https://speedycache.com/
* (c) SpeedyCache Team
*/

namespace SpeedyCache;

if( !defined('SPEEDYCACHE_PRO_VERSION') ){
	die('HACKING ATTEMPT!');
}

class DB{

	static function clean($type){
		if(self::optimize_db($type)){
			wp_send_json(array('success' => true));
		}
	}

	static function optimize_db($type){
		global $wpdb;

		if($type === 'transient_options'){
			$wpdb->query("DELETE FROM `$wpdb->options` WHERE option_name LIKE '%\_transient\_%' ;");
			return true;
		}
		
		if($type === 'expired_transient'){
			$wpdb->query("DELETE FROM `$wpdb->options` WHERE option_name LIKE '_transient_timeout%' AND option_value < " . time());
			return true;
		}
		
		if($type === 'trackback_pingback'){
			$wpdb->query("DELETE FROM `$wpdb->comments` WHERE comment_type = 'trackback' OR comment_type = 'pingback' ;");
			return true;
		}
		
		if($type === 'trashed_spam_comments'){
			$wpdb->query("DELETE FROM `$wpdb->comments` WHERE comment_approved = 'spam' OR comment_approved = 'trash' ;");
			return true;
		}
		
		if($type === 'trashed_contents'){
			$wpdb->query("DELETE FROM `$wpdb->posts` WHERE post_status = 'trash';");
			return true;
		}
		
		if($type === 'post_revisions'){
			$wpdb->query("DELETE FROM `$wpdb->posts` WHERE post_type = 'revision';");
			return true;
		}
		
		if($type === 'all_warnings'){
			$wpdb->query("DELETE FROM `$wpdb->posts` WHERE post_type = 'revision';");
			$wpdb->query("DELETE FROM `$wpdb->posts` WHERE post_status = 'trash';");
			$wpdb->query("DELETE FROM `$wpdb->comments` WHERE comment_approved = 'spam' OR comment_approved = 'trash' ;");
			$wpdb->query("DELETE FROM `$wpdb->comments` WHERE comment_type = 'trackback' OR comment_type = 'pingback' ;");
			$wpdb->query("DELETE FROM `$wpdb->options` WHERE option_name LIKE '%\_transient\_%' ;");
			$wpdb->query("DELETE FROM `$wpdb->options` WHERE option_name LIKE '_transient_timeout%' AND option_value < " . time());
			return true;
		}
	}

	// DB cache cleanup for cron
	static function db_auto_optm_handler(){
		global $speedycache;

		$delete_map = [
			'db_post_revisions' => 'post_revisions',
			'db_trashed_contents' => 'trashed_contents',
			'db_trashed_spam_comments' => 'trashed_spam_comments',
			'db_trackbacks_pingback' => 'trackback_pingback',
			'db_transient_options' => 'transient_options',
			'db_expired_transient' => 'expired_transient'
		];

		foreach($delete_map as $option_key => $clean_type){
			if(!empty($speedycache->options[$option_key])){
				self::optimize_db($clean_type);
			}
		}

		// Log
		if(class_exists('\SpeedyCache\Logs')){
			\SpeedyCache\Logs::log('delete');
			\SpeedyCache\Logs::action();
		}
	}

}


Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
21 Feb 2026 2.55 AM
root / root
0755
admin.php
24.343 KB
18 Feb 2026 11.32 PM
root / root
0644
bloat.php
10.18 KB
18 Feb 2026 11.32 PM
root / root
0644
cli.php
1.627 KB
18 Feb 2026 11.32 PM
root / root
0644
commoncss.php
3.654 KB
18 Feb 2026 11.32 PM
root / root
0644
criticalcss.php
9.979 KB
18 Feb 2026 11.32 PM
root / root
0644
db.php
2.6 KB
18 Feb 2026 11.32 PM
root / root
0644
enhanced.php
47.305 KB
18 Feb 2026 11.32 PM
root / root
0644
googlefonts.php
5.604 KB
18 Feb 2026 11.32 PM
root / root
0644
image.php
71.204 KB
18 Feb 2026 11.32 PM
root / root
0644
index.html
0.089 KB
18 Feb 2026 11.32 PM
root / root
0644
lazyload.php
14.829 KB
18 Feb 2026 11.32 PM
root / root
0644
license.php
4.116 KB
18 Feb 2026 11.32 PM
root / root
0644
logs.php
7.611 KB
18 Feb 2026 11.32 PM
root / root
0644
metaboxpro.php
1.972 KB
18 Feb 2026 11.32 PM
root / root
0644
mobile.php
1.568 KB
18 Feb 2026 11.32 PM
root / root
0644
object-cache-lib.php
10.857 KB
18 Feb 2026 11.32 PM
root / root
0644
objectcache.php
8.471 KB
18 Feb 2026 11.32 PM
root / root
0644
plugin-update-checker.php
52.862 KB
18 Feb 2026 11.32 PM
root / root
0644
premium.php
0.413 KB
18 Feb 2026 11.32 PM
root / root
0644
prooptimizations.php
2.123 KB
18 Feb 2026 11.32 PM
root / root
0644
renderblocking.php
36.803 KB
18 Feb 2026 11.32 PM
root / root
0644
settingspage.php
36.782 KB
18 Feb 2026 11.32 PM
root / root
0644
statistics.php
4.251 KB
18 Feb 2026 11.32 PM
root / root
0644
unusedcss.php
7.452 KB
18 Feb 2026 11.32 PM
root / root
0644
youtube.html
2.29 KB
18 Feb 2026 11.32 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF