!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/wa.picotech.app/public_html/node_modules/cache-manager/dist/   drwxr-xr-x
Free 28.54 GB of 117.98 GB (24.19%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     caching.js (2.77 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.caching = void 0;
const stores_1 = require("./stores");
/**
 * Generic caching interface that wraps any caching library with a compatible interface.
 */
function caching(factory, args) {
    return __awaiter(this, void 0, void 0, function* () {
        let store;
        if (factory === 'memory')
            store = (0, stores_1.memoryStore)(args);
        else if (typeof factory === 'function')
            store = yield factory(args);
        else
            store = factory;
        return {
            /**
             * Wraps a function in cache. I.e., the first time the function is run,
             * its results are stored in cache so subsequent calls retrieve from cache
             * instead of calling the function.
        
             * @example
             * const result = await cache.wrap('key', () => Promise.resolve(1));
             *
             */
            wrap: (key, fn, ttl) => __awaiter(this, void 0, void 0, function* () {
                const value = yield store.get(key);
                if (value === undefined) {
                    const result = yield fn();
                    const cacheTTL = typeof ttl === 'function' ? ttl(result) : ttl;
                    yield store.set(key, result, cacheTTL);
                    return result;
                }
                else if (args === null || args === void 0 ? void 0 : args.refreshThreshold) {
                    const cacheTTL = typeof ttl === 'function' ? ttl(value) : ttl;
                    const remainingTtl = yield store.ttl(key);
                    if (remainingTtl < args.refreshThreshold) {
                        fn().then((result) => store.set(key, result, cacheTTL));
                    }
                }
                return value;
            }),
            store: store,
            del: (key) => store.del(key),
            get: (key) => store.get(key),
            set: (key, value, ttl) => store.set(key, value, ttl),
            reset: () => store.reset(),
        };
    });
}
exports.caching = caching;
//# sourceMappingURL=caching.js.map

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0035 ]--