mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-23 23:20:57 +01:00
Add support for APC(u)
This commit is contained in:
parent
ae2d91c534
commit
a99d7c7c80
@ -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/)
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user