Add support for APC(u)

This commit is contained in:
Fred Brennan 2022-08-29 11:45:59 -04:00 committed by -
parent 4026e4c448
commit fdc574906a
2 changed files with 14 additions and 2 deletions

View File

@ -39,12 +39,13 @@ Requirements
5. [PHP PDO](http://www.php.net/manual/en/intro.pdo.php)
6. A Unix-like OS, preferrably FreeBSD or Linux
We try to make sure vichan is compatible with all major web servers. vichan does not include an Apache ```.htaccess``` file nor does it need one.
We try to make sure vichan is compatible with all major web servers. vichan does not include an Apache `.htaccess` file nor does it need one.
### Recommended
1. MySQL/MariaDB server >= 5.5.3
2. ImageMagick (command-line ImageMagick or GraphicsMagick preferred).
3. [APC (Alternative PHP Cache)](http://php.net/manual/en/book.apc.php),
3. ~~[APC (Alternative PHP Cache)](http://php.net/manual/en/book.apc.php)~~,
[APCu (Alternative PHP Cache)](http://php.net/manual/en/book.apcu.php),
[XCache](http://xcache.lighttpd.net/),
[Memcached](http://www.php.net/manual/en/intro.memcached.php) or
[Redis](https://redis.io/docs/about/)

View File

@ -44,6 +44,9 @@ class Cache {
case 'apc':
$data = apc_fetch($key);
break;
case 'apcu':
$data = apcu_fetch($key);
break;
case 'xcache':
$data = xcache_get($key);
break;
@ -95,6 +98,9 @@ class Cache {
case 'apc':
apc_store($key, $value, $expires);
break;
case 'apcu':
apcu_store($key, $value, $expires);
break;
case 'xcache':
xcache_set($key, $value, $expires);
break;
@ -130,6 +136,9 @@ class Cache {
case 'apc':
apc_delete($key);
break;
case 'apcu':
apcu_delete($key);
break;
case 'xcache':
xcache_unset($key);
break;
@ -156,6 +165,8 @@ class Cache {
return self::$cache->flush();
case 'apc':
return apc_clear_cache('user');
case 'apcu':
return apcu_clear_cache('user');
case 'php':
self::$cache = array();
break;