Plugin Directory

Changeset 2186116


Ignore:
Timestamp:
11/05/2019 12:19:18 PM (6 years ago)
Author:
upress
Message:

v1.3.4

Location:
ezcache
Files:
128 added
6 edited

Legend:

Unmodified
Added
Removed
  • ezcache/trunk/changelog.txt

    r2179182 r2186116  
     1= 1.3.4 =
     2- FIX: Store only gzipped cache data to save on disk space
     3- FIX: External images processed as internal
     4
     5= 1.3.3 =
     6- FIX: Error preventing media file deletion
     7
    18= 1.3.2 =
    2 - FIX: error preventing saving in plugin/theme editor
     9- FIX: Error preventing saving in plugin/theme editor
    310
    411= 1.3.1 =
  • ezcache/trunk/ezcache.php

    r2179182 r2186116  
    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.3.2
     6    Version: 1.3.4
    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.3.2' );
     38    define( 'EZCACHE_VERSION', '1.3.4' );
    3939    define( 'EZCACHE_SETTINGS_KEY', 'ezcache' );
    4040}
  • ezcache/trunk/includes/BackgroundProcesses/ConvertWebpProcess.php

    r2179182 r2186116  
    106106
    107107        foreach ( $data as $cache_file => $images ) {
    108             $contents = file_get_contents( $cache_file );
     108            $contents = gzdecode( file_get_contents( $cache_file ) );
    109109
    110110            foreach ( $images as $image_data ) {
     
    112112            }
    113113
    114             @file_put_contents( $cache_file, $contents );
    115             @file_put_contents( $cache_file . '.gz', gzencode( $contents, 6, FORCE_GZIP ) );
     114            @file_put_contents( $cache_file, gzencode( $contents, 6, FORCE_GZIP ) );
    116115        }
    117116
  • ezcache/trunk/includes/Cache.php

    r2179182 r2186116  
    648648        $gzip_accepted = $this->gzip_accepted();
    649649
    650         $serve_gzip = $gzip_accepted && file_exists( $cache_file . '.gz' );
    651         $cache_file = $serve_gzip ? ($cache_file . '.gz') : $cache_file;
     650        $cache_file = $cache_file . '.gz';
    652651        $filesize = file_exists( $cache_file ) ? @filesize( $cache_file ) : false;
    653652
     
    659658        header( "X-Cached-With: ezCache" );
    660659        header( "Vary: Accept-Encoding, Cookie" );
    661 //      header( "Content-Length: {$filesize}" );
    662660        header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s', filemtime( $cache_file ) ) . ' GMT' );
    663661
     
    678676
    679677        // Serve the cache if file isn't store in the client browser cache.
    680         if ( $serve_gzip ) {
     678        // if the browser does not support gzip read the file and output it without gzip encoding
     679        if ( ! $gzip_accepted ) {
    681680            readgzfile( $cache_file );
    682681            exit;
    683682        }
    684683
     684        // otherwise output the gzipped file as-is
     685        header( "Content-Length: {$filesize}" );
     686        header( "Content-Encoding: gzip" );
    685687        readfile( $cache_file );
    686688        exit;
     
    735737
    736738        $real_cache_dir = $this->get_real_cache_dir();
    737         $cache_file = $this->get_cache_file_path();
     739        $cache_file = $this->get_cache_file_path() . '.gz';
    738740        $asset_cache_dir = $this->get_default_cache_path() . 'min/';
    739741        $asset_cache_url = trailingslashit( trailingslashit( get_home_url() ) . trim( str_replace( dirname( WP_CONTENT_DIR ), '', $asset_cache_dir ), '/' ) );
     
    813815        }
    814816
    815         // write regular file
    816         if ( ! @file_put_contents( $cache_file, $buffer ) ) {
     817        // write gzipped file
     818        if ( ! @file_put_contents( $cache_file, gzencode( $buffer, 6, FORCE_GZIP ) ) ) {
    817819            error_log( 'ezCache could not write to ' . str_replace( ABSPATH, '', $cache_file ) );
    818         }
    819 
    820         // write gzipped file
    821         if ( ! @file_put_contents( $cache_file . '.gz', gzencode( $buffer, 6, FORCE_GZIP ) ) ) {
    822             error_log( 'ezCache could not write to ' . str_replace( ABSPATH, '', $cache_file . '.gz' ) );
    823820        }
    824821
  • ezcache/trunk/includes/FileOptimizer/WebpConverter.php

    r2179182 r2186116  
    4747        foreach ( $images as $image ) {
    4848            $image_url = $image[2];
    49             $image_path = $this->get_file_path( $image[2] );
    5049
    5150            // we don't process external files or files that don't exist
    52             if( ! file_exists( $image_path ) || $this->is_external_file( $image_url ) ) {
     51
     52            if($this->is_external_file( $image_url )) {
     53                continue;
     54            }
     55
     56            $image_path = $this->get_file_path( $image[2] );
     57            if( ! file_exists( $image_path ) ) {
    5358                continue;
    5459            }
  • ezcache/trunk/readme.txt

    r2179182 r2186116  
    3636== Changelog ==
    3737
     38= 1.3.4 =
     39- FIX: Store only gzipped cache data to save on disk space
     40- FIX: External images processed as internal
     41
     42= 1.3.3 =
     43- FIX: Error preventing media file deletion
     44
    3845= 1.3.2 =
    39 - FIX: error preventing saving in plugin/theme editor
     46- FIX: Error preventing saving in plugin/theme editor
    4047
    4148= 1.3.1 =
     
    4855- ADD: Disable Emoji
    4956- ADD: Auto detection for Woocommerce cart and checkout pages
    50 
    51 = 1.2.4 =
    52 - FIX: Error when installing with another caching plugin
    53 - FIX: Better WordPress compatibility
    54 - FIX: Rest API support for older server software not supporting HTTP methods other than GET/POST
Note: See TracChangeset for help on using the changeset viewer.