Changeset 3770792
- Timestamp:
- 10/28/2026 01:45:55 PM (4 weeks ago)
- Location:
- wpbase-cache/trunk
- Files:
-
- 4 edited
-
includes/object-cache.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
-
wpbase-cache.php (modified) (4 diffs)
-
wpbase-redis-cache.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wpbase-cache/trunk/includes/object-cache.php
r2694612 r3770792 1 1 <?php 2 2 /** 3 * Plugin Name: Redis Object Cache Drop-In3 * Drop In Name: Redis Object Cache Drop-In 4 4 * Plugin URI: http://wordpress.org/plugins/redis-cache/ 5 5 * Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, Credis, HHVM, replication, clustering and WP-CLI. … … 17 17 // phpcs:disable Generic.WhiteSpace.ScopeIndent.IncorrectExact, Generic.WhiteSpace.ScopeIndent.Incorrect 18 18 if ( ! defined( 'WP_REDIS_DISABLED' ) || ! WP_REDIS_DISABLED ) : 19 19 20 define('WP_CACHE_KEY_SALT', DB_NAME); 20 21 21 22 22 /** -
wpbase-cache/trunk/readme.txt
r3227421 r3770792 3 3 Tags: cache,chaching,speed,performance,db cache,optimization,nginx,varnish 4 4 Requires at least: 3.5 5 Tested up to: 6.75 Tested up to: 7.1 6 6 Stable tag: trunk 7 7 Donate link: -
wpbase-cache/trunk/wpbase-cache.php
r3227421 r3770792 4 4 Plugin URI: https://www.wpoven.com/ 5 5 Description: Custom WordPress Caching plugin for WPOven Hosted Sites which uses all caches on varnish, nginx, php-fpm stack and Redis. 6 Version: 5.5. 66 Version: 5.5.7 7 7 Author: Vikrant Datta 8 8 Author URI: https://www.wpoven.com/ … … 51 51 52 52 if (!isset($check_cache)) { 53 $content = wp_remote_get("https:// wpoven.com/sites/check/wpbasecachecheck/" . $sitename);53 $content = wp_remote_get("https://app.wpoven.com/sites/check/wpbasecachecheck/" . $sitename); 54 54 $content = (int) $content; 55 55 update_option('wpbase_check_site', $content); … … 75 75 $req_cache = json_decode($req_cache, true); 76 76 if (!get_option('wpbase_req_cache_new')) { 77 $content = wp_remote_get("https:// wpoven.com/sites/checksiteinfo/" . $sitename);77 $content = wp_remote_get("https://app.wpoven.com/sites/checksiteinfo/" . $sitename); 78 78 $return_array = json_decode($content['body'], true); 79 79 update_option('wpbase_req_cache_new', $content['body']); … … 96 96 'id' => 'WPOven-button', 97 97 'title' => 'WPOven Site Dashboard', 98 'href' => 'https:// wpoven.com/sites/edit/' . $sitename,98 'href' => 'https://app.wpoven.com/sites/edit/' . $sitename, 99 99 'meta' => array( 100 100 'class' => 'dashboard-button-class' -
wpbase-cache/trunk/wpbase-redis-cache.php
r2694612 r3770792 251 251 } 252 252 253 254 255 public function do_admin_actions() { 256 if(strpos($_SERVER["HTTP_REFERER"], "options-general.php?page=wpbasecache") !== false){ 257 global $wp_filesystem; 258 if ( $this->initialize_filesystem( $url, true ) ) { 259 if ($_POST['wpbase_cache_options']['redis_cache'] == '1') { 260 update_option('wpbase_cache_options', 'redis_cache', "1"); 261 $wp_filesystem->copy(plugin_dir_path(__FILE__) . '/includes/object-cache.php', WP_CONTENT_DIR . '/object-cache.php', true); 262 do_action( 'redis_object_cache_enable', $result ); 263 } else if ($_POST['wpbase_cache_options']['redis_cache'] == NULL || $_POST['wpbase_cache_options']['redis_cache'] == '0') { 264 update_option('wpbase_cache_options', 'redis_cache', '0'); 265 $wp_filesystem->delete(WP_CONTENT_DIR . '/object-cache.php'); 266 do_action( 'redis_object_cache_disable', $result ); 267 } 268 } 269 } 253 public function do_admin_actions() { 254 if ( ! is_admin() || ! is_user_logged_in() || ! current_user_can( 'manage_options' ) ) { 255 return; 256 } 257 258 if ( empty( $_POST['wpbase_cache_options']['redis_cache'] ) && ! array_key_exists( 'redis_cache', (array) $_POST['wpbase_cache_options'] ) ) { 259 return; 260 } 261 262 if ( ! empty( $_SERVER['HTTP_REFERER'] ) && false !== strpos( wp_unslash( $_SERVER['HTTP_REFERER'] ), 'options-general.php?page=wpbasecache' ) ) { 263 global $wp_filesystem; 264 $options = get_option( 'wpbase_cache_options', array() ); 265 $redis_cache = sanitize_text_field( wp_unslash( $_POST['wpbase_cache_options']['redis_cache'] ) ); 266 267 if ( $redis_cache === '1' ) { 268 $options['redis_cache'] = 1; 269 if ( $this->initialize_filesystem( admin_url( 'options-general.php?page=wpbasecache' ), true ) ) { 270 $wp_filesystem->copy( plugin_dir_path( __FILE__ ) . '/includes/object-cache.php', WP_CONTENT_DIR . '/object-cache.php', true ); 271 do_action( 'redis_object_cache_enable', $result ); 272 } 273 } else { 274 $options['redis_cache'] = 0; 275 if ( $this->initialize_filesystem( admin_url( 'options-general.php?page=wpbasecache' ), true ) ) { 276 $wp_filesystem->delete( WP_CONTENT_DIR . '/object-cache.php' ); 277 do_action( 'redis_object_cache_disable', $result ); 278 } 279 } 280 update_option( 'wpbase_cache_options', $options ); 281 } 270 282 } 271 283
Note:
See TracChangeset
for help on using the changeset viewer.