Plugin Directory

Changeset 2177211


Ignore:
Timestamp:
10/21/2019 10:59:42 PM (6 years ago)
Author:
limelightdept
Message:

tagging version 1.1.6

Location:
cache-ultra
Files:
1 deleted
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • cache-ultra/tags/1.1.6/README.md

    r2177143 r2177211  
    88Author: Limelight Department
    99Tested up to: 5.2.3
    10 Stable tag: "1.1.5"
    11 Version 1.1.5
     10Stable tag: "1.1.6"
     11Version 1.1.6
    1212License: GPLv2 or later
    1313License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4747
    4848== Changelog ==
     49
     501.1.6
     51- Fixed issue with mismatching md5 hashes for tmp files.
    4952
    50531.1.5
  • cache-ultra/tags/1.1.6/index.php

    r2177143 r2177211  
    44 * Plugin URI:        https://limelighttheme.com/cache-ultra/
    55 * Description:       Cache Ultra Plugin for Wordpress
    6  * Version:           1.1.5
     6 * Version:           1.1.6
    77 * Author:            Limelight Department
    88 * Author URI:        https://limelighttheme.com/
     
    1717define('CACHE_ULTRA_DIR', __DIR__);
    1818
    19 define('CACHE_ULTRA_VERSION', '1.1.5');
     19define('CACHE_ULTRA_VERSION', '1.1.6');
    2020
    2121define('CACHE_ULTRA_MODE', 'prod');
  • cache-ultra/tags/1.1.6/src/Controllers/ResourceController.php

    r2177127 r2177211  
    2525
    2626    private function __construct() {
    27         $this->url = CACHE_ULTRA_API_MODE == 'dev' ? 'https://fced6fcb.ngrok.io/' : 'https://cache.limelightdept.com/';
     27        $this->url = CACHE_ULTRA_API_MODE == 'dev' ? 'https://b0b4686c.ngrok.io/' : 'https://cache.limelightdept.com/';
    2828    }
    2929
     
    185185            'url' => $permalink,
    186186        ];
    187         RequestService::getInstance()->request($request_data,$this->url.'api/resources/process/'.$cache['id']);
     187        RequestService::getInstance()->request($request_data,$this->url.'api/resources/process/'.$cache['id'],'map_resources');
    188188        return new \WP_REST_Response( [
    189189            'success' => 1,
  • cache-ultra/tags/1.1.6/src/Controllers/SnapshotController.php

    r2177127 r2177211  
    1717
    1818    private function __construct() {
    19         $this->url = CACHE_ULTRA_API_MODE == 'dev' ? 'https://fced6fcb.ngrok.io/' : 'https://cache.limelightdept.com/';
     19        $this->url = CACHE_ULTRA_API_MODE == 'dev' ? 'https://b0b4686c.ngrok.io/' : 'https://cache.limelightdept.com/';
    2020    }
    2121
     
    261261                    'cache' => $cache,
    262262                ];
    263                 RequestService::getInstance()->request($request_data,$this->url.'api/snapshot/process/'.$cache['id']);
     263                RequestService::getInstance()->request($request_data,$this->url.'api/snapshot/process/'.$cache['id'],'snapshot');
    264264                return new \WP_REST_Response( [
    265265                    'success' => 1,
  • cache-ultra/tags/1.1.6/src/Services/Cache.php

    r2177143 r2177211  
    77use CacheUltra\Models\Resource;
    88use CacheUltra\Services\Security;
     9use CacheUltra\Services\Resource AS ResourceService;
    910use CacheUltra\Services\Request AS RequestService;
     11
    1012class Cache {
    1113
     
    1517
    1618    public function __construct() {
    17         $this->url = CACHE_ULTRA_API_MODE == 'dev' ? 'https://fced6fcb.ngrok.io/' : 'https://cache.limelightdept.com/';
     19        $this->url = CACHE_ULTRA_API_MODE == 'dev' ? 'https://b0b4686c.ngrok.io/' : 'https://cache.limelightdept.com/';
    1820        add_filter('cron_schedules',[$this, 'CronSchedule']);
    1921        if ( ! wp_next_scheduled( 'cu_CheckCaches' ) ) {
     
    4244        ];
    4345        try{
    44             RequestService::getInstance()->request($request_data,$this->url.'api/snapshot/performance/'.$cache['id']);
     46            RequestService::getInstance()->request($request_data,$this->url.'api/snapshot/performance/'.$cache['id'],'performance');
    4547        }catch(\Exception $e) {
    4648            return true;
     
    5052    public function CheckCaches() {
    5153        $caches = CacheModel::getEnabled();
    52         $messages = [];
     54        //$messages = [];
    5355        foreach($caches AS $cache) {
    54             $messages[$cache['id']] = $this->processCache($cache);
     56
     57            if($cache['status'] != '1') return 'this cache is processing.';
     58            $timestamp = time();
     59            $checkTime = $timestamp - $cache['timestamp'];
     60            if($checkTime < 28800) return 'has not yet been eight hours.';
     61
     62            ResourceService::getInstance()->process($cache,['javascript','css'],$cache['timestamp']);
     63            //$messages[$cache['id']] = $this->processCache($cache);
    5564        }
    5665    }
     
    136145            'cache' => $cache,
    137146        ];
    138         RequestService::getInstance()->request($request_data,$this->url.'api/snapshot/process/'.$cache['id']);
     147        RequestService::getInstance()->request($request_data,$this->url.'api/snapshot/process/'.$cache['id'],'snapshot');
    139148        return new \WP_REST_Response( [
    140149            'success' => 1,
     
    266275                'cache' => $cache,
    267276            ];
    268             RequestService::getInstance()->request($request_data,$this->url.'api/snapshot/process/'.$cache['id']);
     277            RequestService::getInstance()->request($request_data,$this->url.'api/snapshot/process/'.$cache['id'],'snapshot');
    269278
    270279        }catch(\Exception $e){
  • cache-ultra/tags/1.1.6/src/Services/Request.php

    r2175848 r2177211  
    1212
    1313    }
    14     public function request($data,$api){
    15         $tmp_file = CACHE_ULTRA_TMP_DIR.'/'.md5($data['cache']['id'] . \get_site_url() . $data['time']);
     14    public function request($data,$api,$type){
     15        $tmp_file = CACHE_ULTRA_TMP_DIR.'/'.md5($data['cache']['id'] . \get_site_url() . $data['time'] . $type);
    1616        file_put_contents($tmp_file,base64_encode(serialize($data)));
    1717        $client = new \GuzzleHttp\Client();
  • cache-ultra/tags/1.1.6/src/Services/Resource.php

    r2177127 r2177211  
    2626
    2727    private function __construct() {
    28         $this->url = CACHE_ULTRA_API_MODE == 'dev' ? 'https://fced6fcb.ngrok.io/' : 'https://cache.limelightdept.com/';
     28        $this->url = CACHE_ULTRA_API_MODE == 'dev' ? 'https://b0b4686c.ngrok.io/' : 'https://cache.limelightdept.com/';
    2929    }
    3030   
     
    6464        $headers = ['Referrer' => \get_site_url()];
    6565        try{
    66             RequestService::getInstance()->request($request_data,$this->url.'api/resources/process/'.$cache['id']);
     66            RequestService::getInstance()->request($request_data,$this->url.'api/resources/process/'.$cache['id'],'map_resources');
    6767            return $cache;
    6868        }catch(\Exception $e){
  • cache-ultra/trunk/README.md

    r2177143 r2177211  
    88Author: Limelight Department
    99Tested up to: 5.2.3
    10 Stable tag: "1.1.5"
    11 Version 1.1.5
     10Stable tag: "1.1.6"
     11Version 1.1.6
    1212License: GPLv2 or later
    1313License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4747
    4848== Changelog ==
     49
     501.1.6
     51- Fixed issue with mismatching md5 hashes for tmp files.
    4952
    50531.1.5
  • cache-ultra/trunk/index.php

    r2177143 r2177211  
    44 * Plugin URI:        https://limelighttheme.com/cache-ultra/
    55 * Description:       Cache Ultra Plugin for Wordpress
    6  * Version:           1.1.5
     6 * Version:           1.1.6
    77 * Author:            Limelight Department
    88 * Author URI:        https://limelighttheme.com/
     
    1717define('CACHE_ULTRA_DIR', __DIR__);
    1818
    19 define('CACHE_ULTRA_VERSION', '1.1.5');
     19define('CACHE_ULTRA_VERSION', '1.1.6');
    2020
    2121define('CACHE_ULTRA_MODE', 'prod');
  • cache-ultra/trunk/src/Controllers/ResourceController.php

    r2177127 r2177211  
    2525
    2626    private function __construct() {
    27         $this->url = CACHE_ULTRA_API_MODE == 'dev' ? 'https://fced6fcb.ngrok.io/' : 'https://cache.limelightdept.com/';
     27        $this->url = CACHE_ULTRA_API_MODE == 'dev' ? 'https://b0b4686c.ngrok.io/' : 'https://cache.limelightdept.com/';
    2828    }
    2929
     
    185185            'url' => $permalink,
    186186        ];
    187         RequestService::getInstance()->request($request_data,$this->url.'api/resources/process/'.$cache['id']);
     187        RequestService::getInstance()->request($request_data,$this->url.'api/resources/process/'.$cache['id'],'map_resources');
    188188        return new \WP_REST_Response( [
    189189            'success' => 1,
  • cache-ultra/trunk/src/Controllers/SnapshotController.php

    r2177127 r2177211  
    1717
    1818    private function __construct() {
    19         $this->url = CACHE_ULTRA_API_MODE == 'dev' ? 'https://fced6fcb.ngrok.io/' : 'https://cache.limelightdept.com/';
     19        $this->url = CACHE_ULTRA_API_MODE == 'dev' ? 'https://b0b4686c.ngrok.io/' : 'https://cache.limelightdept.com/';
    2020    }
    2121
     
    261261                    'cache' => $cache,
    262262                ];
    263                 RequestService::getInstance()->request($request_data,$this->url.'api/snapshot/process/'.$cache['id']);
     263                RequestService::getInstance()->request($request_data,$this->url.'api/snapshot/process/'.$cache['id'],'snapshot');
    264264                return new \WP_REST_Response( [
    265265                    'success' => 1,
  • cache-ultra/trunk/src/Services/Cache.php

    r2177143 r2177211  
    77use CacheUltra\Models\Resource;
    88use CacheUltra\Services\Security;
     9use CacheUltra\Services\Resource AS ResourceService;
    910use CacheUltra\Services\Request AS RequestService;
     11
    1012class Cache {
    1113
     
    1517
    1618    public function __construct() {
    17         $this->url = CACHE_ULTRA_API_MODE == 'dev' ? 'https://fced6fcb.ngrok.io/' : 'https://cache.limelightdept.com/';
     19        $this->url = CACHE_ULTRA_API_MODE == 'dev' ? 'https://b0b4686c.ngrok.io/' : 'https://cache.limelightdept.com/';
    1820        add_filter('cron_schedules',[$this, 'CronSchedule']);
    1921        if ( ! wp_next_scheduled( 'cu_CheckCaches' ) ) {
     
    4244        ];
    4345        try{
    44             RequestService::getInstance()->request($request_data,$this->url.'api/snapshot/performance/'.$cache['id']);
     46            RequestService::getInstance()->request($request_data,$this->url.'api/snapshot/performance/'.$cache['id'],'performance');
    4547        }catch(\Exception $e) {
    4648            return true;
     
    5052    public function CheckCaches() {
    5153        $caches = CacheModel::getEnabled();
    52         $messages = [];
     54        //$messages = [];
    5355        foreach($caches AS $cache) {
    54             $messages[$cache['id']] = $this->processCache($cache);
     56
     57            if($cache['status'] != '1') return 'this cache is processing.';
     58            $timestamp = time();
     59            $checkTime = $timestamp - $cache['timestamp'];
     60            if($checkTime < 28800) return 'has not yet been eight hours.';
     61
     62            ResourceService::getInstance()->process($cache,['javascript','css'],$cache['timestamp']);
     63            //$messages[$cache['id']] = $this->processCache($cache);
    5564        }
    5665    }
     
    136145            'cache' => $cache,
    137146        ];
    138         RequestService::getInstance()->request($request_data,$this->url.'api/snapshot/process/'.$cache['id']);
     147        RequestService::getInstance()->request($request_data,$this->url.'api/snapshot/process/'.$cache['id'],'snapshot');
    139148        return new \WP_REST_Response( [
    140149            'success' => 1,
     
    266275                'cache' => $cache,
    267276            ];
    268             RequestService::getInstance()->request($request_data,$this->url.'api/snapshot/process/'.$cache['id']);
     277            RequestService::getInstance()->request($request_data,$this->url.'api/snapshot/process/'.$cache['id'],'snapshot');
    269278
    270279        }catch(\Exception $e){
  • cache-ultra/trunk/src/Services/Request.php

    r2175848 r2177211  
    1212
    1313    }
    14     public function request($data,$api){
    15         $tmp_file = CACHE_ULTRA_TMP_DIR.'/'.md5($data['cache']['id'] . \get_site_url() . $data['time']);
     14    public function request($data,$api,$type){
     15        $tmp_file = CACHE_ULTRA_TMP_DIR.'/'.md5($data['cache']['id'] . \get_site_url() . $data['time'] . $type);
    1616        file_put_contents($tmp_file,base64_encode(serialize($data)));
    1717        $client = new \GuzzleHttp\Client();
  • cache-ultra/trunk/src/Services/Resource.php

    r2177127 r2177211  
    2626
    2727    private function __construct() {
    28         $this->url = CACHE_ULTRA_API_MODE == 'dev' ? 'https://fced6fcb.ngrok.io/' : 'https://cache.limelightdept.com/';
     28        $this->url = CACHE_ULTRA_API_MODE == 'dev' ? 'https://b0b4686c.ngrok.io/' : 'https://cache.limelightdept.com/';
    2929    }
    3030   
     
    6464        $headers = ['Referrer' => \get_site_url()];
    6565        try{
    66             RequestService::getInstance()->request($request_data,$this->url.'api/resources/process/'.$cache['id']);
     66            RequestService::getInstance()->request($request_data,$this->url.'api/resources/process/'.$cache['id'],'map_resources');
    6767            return $cache;
    6868        }catch(\Exception $e){
Note: See TracChangeset for help on using the changeset viewer.