Plugin Directory

Changeset 2892153


Ignore:
Timestamp:
04/02/2023 12:02:44 PM (3 years ago)
Author:
upress
Message:

update v1.6.1

Location:
ezcache
Files:
96 added
3 edited

Legend:

Unmodified
Added
Removed
  • ezcache/trunk/changelog.txt

    r2812876 r2892153  
     1= 1.6.1 =
     2- Fix problem setting up scheduled task for old cache cleanup
     3
    14= 1.6.0 =
    25- Log only when debug is enabled
  • ezcache/trunk/ezcache.php

    r2828395 r2892153  
    44    Description: ezCache is an easy and innovative cache plugin that will help you significantly improve your site speed.
    55    Plugin URI: https://ezcache.app
    6     Version: 1.6.0
     6    Version: 1.6.1
    77    Author: uPress
    88    Author URI: https://www.upress.io
     
    3636    define( 'EZCACHE_URL', plugin_dir_url( __FILE__ ) );
    3737    define( 'EZCACHE_BASEBANE', basename( __FILE__ ) );
    38     define( 'EZCACHE_VERSION', '1.6.0' );
     38    define( 'EZCACHE_VERSION', '1.6.1' );
    3939    define( 'EZCACHE_SETTINGS_KEY', 'ezcache' );
    4040
     
    104104            add_action( 'init', [ $this, 'load_translation' ] );
    105105            add_filter( 'cron_schedules', [ $this, 'add_cron_schedules' ] );
    106             add_action( 'plugin_loaded', [ $this, 'maybe_repair_installation' ] );
     106            add_action( 'init', [ $this, 'maybe_repair_installation' ] );
    107107
    108108            new RestApi( $this );
     
    126126
    127127        function activation_hook() {
     128            set_transient( 'ezcache_activating', true );
     129
    128130            // copy advanced-cache
    129131            copy( EZCACHE_DIR . '/advanced-cache.php', WP_CONTENT_DIR . '/advanced-cache.php' );
    130132
    131             Settings::maybe_update_cronjobs( Settings::get_settings() );
     133            if ( ! wp_next_scheduled( 'ezcache_clear_expired_cache' ) ) {
     134                Settings::maybe_update_cronjobs( Settings::get_settings() );
     135            }
    132136            Updater::upgrade();
    133137
     
    135139
    136140            $this->ezcache->preload_homepage();
     141
     142            delete_transient( 'ezcache_activating' );
    137143        }
    138144
    139145        function deactivation_hook() {
     146            set_transient( 'ezcache_deactivating', true );
     147
    140148            // delete advanced-cache
    141149            if ( file_exists( WP_CONTENT_DIR . '/advanced-cache.php' ) ) {
     
    152160
    153161            $this->ezcache->clear_cache();
     162
     163            delete_transient( 'ezcache_deactivating' );
    154164        }
    155165
     
    263273         */
    264274        function maybe_repair_installation() {
    265             if ( isset( $_SESSION['EZCACHE_REPAIRED'] ) || get_transient( 'ezcache_deactivating' ) || get_transient( 'ezcache_activating' ) ) {
    266                 return;
    267             }
    268 
    269             $status = $this->plugin->ezcache->get_status();
     275            $repaired = get_transient( 'ezcache_repaired' );
     276            delete_transient( 'ezcache_repaired' );
     277
     278            if ( $repaired || get_transient( 'ezcache_deactivating' ) || get_transient( 'ezcache_activating' ) ) {
     279                return;
     280            }
     281
     282            if ( ! wp_next_scheduled( 'ezcache_clear_expired_cache' ) ) {
     283                Settings::maybe_update_cronjobs( Settings::get_settings() );
     284            }
     285
     286            $status = $this->ezcache->get_status();
    270287            if ( $status['cache_enabled'] && $status['adv_cache_exists'] && $status['adv_cache_exists'] && $status['correct_cache_exists'] && $status['webp_table_exists'] ) {
    271288                return;
    272289            }
    273290
    274             $this->plugin->activation_hook();
    275 
    276             $_SESSION['EZCACHE_REPAIRED'] = true;
     291            $this->activation_hook();
     292
     293            set_transient( 'ezcache_repaired', true );
    277294        }
    278295    }
  • ezcache/trunk/readme.txt

    r2812876 r2892153  
    44Requires PHP: 5.6
    55Requires at least: 4.6
    6 Tested up to: 6.1
     6Tested up to: 6.2
    77Stable tag: trunk
    88License: GPLv2 or later
     
    3535
    3636== Changelog ==
     37= 1.6.1 =
     38- Fix problem setting up scheduled task for old cache cleanup
     39
    3740= 1.6.0 =
    3841- Log only when debug is enabled
Note: See TracChangeset for help on using the changeset viewer.