* @copyright Copyright 2020-2023 © Teamwant Mateusz Szymański All right reserved * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @category Teamwant * @package Teamwant */ abstract class Cache extends CacheCore { /** * @return Cache */ /* * module: teamwant_redis * date: 2023-03-29 22:51:19 * version: 2.1.1 */ public static function getInstance() { if (!self::$instance) { $caching_system = _PS_CACHING_SYSTEM_; if ($caching_system === 'Redis') { if (!class_exists(\Teamwant\Prestashop17\Redis\Classes\Cache\Redis::class)) { require_once _PS_MODULE_DIR_ . 'teamwant_redis/vendor/autoload.php'; } $caching_system = \Teamwant\Prestashop17\Redis\Classes\Cache\Redis::class; } self::$instance = new $caching_system(); } return self::$instance; } }