Added apcu caching method and bump

This commit is contained in:
Pablo Ferreiro 2023-01-25 15:56:23 +01:00
parent faf1dcee51
commit d273b35e53
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
5 changed files with 38 additions and 8 deletions

View file

@ -1,6 +1,7 @@
<?php
namespace App\Helpers;
use App\Cache\ApcuCache;
use App\Cache\JSONCache;
use App\Cache\RedisCache;
use App\Constants\CacheMethods;
@ -138,6 +139,9 @@ class Wrappers {
case CacheMethods::JSON:
$cacheEngine = new JSONCache();
break;
case CacheMethods::APCU:
$cacheEngine = new ApcuCache();
break;
case CacheMethods::REDIS:
if (!(isset($_ENV['REDIS_URL']) || isset($_ENV['REDIS_HOST'], $_ENV['REDIS_PORT']))) {
throw new \Exception('You need to set REDIS_URL or REDIS_HOST and REDIS_PORT to use Redis Cache!');