$96 GRAYBYTE WORDPRESS FILE MANAGER $71

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/bqrcodec/contact.rohto.com.vn/wp-content/plugins/rabbit-loader/inc/

HOME
Current File : /home/bqrcodec/contact.rohto.com.vn/wp-content/plugins/rabbit-loader/inc//cache.php
<?php

class RL21CFile{

    public const TTL_LONG = "long";
    public const TTL_SHORT = "short";

    private $fp_long = '';
    private $fp_short = '';

    public function __construct($request_url)
    {
        $hash = md5($request_url);
        $this->fp_long =  RL21UtilWP::get_cache_dir(self::TTL_LONG).DIRECTORY_SEPARATOR.$hash; 
        $this->fp_short =  RL21UtilWP::get_cache_dir(self::TTL_SHORT).DIRECTORY_SEPARATOR.$hash; 
    }

    public function exists($ttl, $shouldBeAfter=0){
        $fp = $ttl==RL21CFile::TTL_LONG ? $this->fp_long.'_c': $this->fp_short.'_c';
        $fe = file_exists($fp);
        if($fe && $shouldBeAfter && $shouldBeAfter>631152000){
            $mt = filemtime($fp);
            if($mt && $mt<$shouldBeAfter){
                //post is modified after cache was generated
                $fe = false;
            }
        }
        return $fe;
    }
    
    public function delete($ttl){
        $fp = $ttl==RL21CFile::TTL_LONG ? $this->fp_long: $this->fp_short;
        $count = 0;
        if(is_file($fp.'_c') && @unlink($fp.'_c')){
            $count++;
        }
        if(is_file($fp.'_h') && @unlink($fp.'_h')){
            $count++;
        }
        return $count;
    }

    public function invalidate(){
        $fp = $this->fp_long.'_c';
        if(is_file($fp)) {
            $content = file_get_contents($fp);
            if($content!==false){
                $content = str_ireplace(['"rlCacheRebuild": "N"', '"rlCacheRebuild":"N"'], '"rlCacheRebuild": "Y"', $content);
            }
            RabbitLoader_21_Util_Core::fpc($fp, $content, WP_DEBUG);
        }
    }


    public function &get($ttl, $type){
        $fp = $ttl==RL21CFile::TTL_LONG ? $this->fp_long: $this->fp_short;
        $content = '';
        if(file_exists($fp.'_'.$type)){
            $content = file_get_contents($fp.'_'.$type);
        }
        return $content;
    }

    public function serve(){
        if($this->exists(RL21CFile::TTL_LONG)){
            $content = file_get_contents($this->fp_long.'_c');
            if ($content!==false){
                if (RabbitLoader_21_Core::strHasValidClosingTags($content)) {
                    if(file_exists($this->fp_long.'_h')){
                        //header is optional
                        RabbitLoader_21_Util_Core::send_headers(file_get_contents($this->fp_long.'_h'));
                    }
                    RabbitLoader_21_Core::sendHeader('x-rl-cache: hit', true);
                    echo $content;
                    return true;
                }
            }
        }
        return false;
    }

    public function save($ttl, &$content, &$headers){
        $fp = $ttl==RL21CFile::TTL_LONG ? $this->fp_long: $this->fp_short;
        $headers = json_encode($headers, JSON_INVALID_UTF8_IGNORE);
        $count = 0;
        if(RabbitLoader_21_Util_Core::fpc($fp.'_h', $headers, WP_DEBUG)){
            $count++;
        }
        if(RabbitLoader_21_Util_Core::fpc($fp.'_c', $content, WP_DEBUG)){
            $count++;
        }
        return $count;
    }
}

?>

Current_dir [ WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0755
RabbitLoader
--
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0755
core
--
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0755
ad_ad.php
1.166 KB
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0644
admin.php
17.775 KB
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0644
cache.php
2.998 KB
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0644
conflicts.php
15.322 KB
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0644
pub_cdn.php
3.035 KB
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0644
public.php
9.247 KB
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0644
rl_can_url.php
2.278 KB
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0644
tab_css.php
3.753 KB
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0644
tab_geo.php
3.041 KB
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0644
tab_help.php
5.679 KB
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0644
tab_home.php
17.003 KB
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0644
tab_images.php
3.958 KB
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0644
tab_init.php
15.737 KB
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0644
tab_log.php
2.655 KB
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0644
tab_settings.php
20.39 KB
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0644
tab_urls.php
3.052 KB
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0644
tab_usage.php
3.415 KB
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0644
util_wp.php
11.068 KB
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF