diff --git a/doc/Installation.md b/doc/Installation.md index f8f97500..36d3365e 100644 --- a/doc/Installation.md +++ b/doc/Installation.md @@ -30,7 +30,7 @@ for more information. ### Optional Requirements - PHP with GD extension (when using identicon or vizhash icons, jdenticon works - without it) + without it) and OPcache (for better performance) - a database supported by [PHP PDO](https://php.net/manual/book.pdo.php) and the PHP PDO extension (when using database storage) - a Ceph cluster with Rados gateway or AWS S3 storage (when using S3 storage) diff --git a/lib/Data/Filesystem.php b/lib/Data/Filesystem.php index b6837e26..7c921ae1 100644 --- a/lib/Data/Filesystem.php +++ b/lib/Data/Filesystem.php @@ -269,7 +269,9 @@ class Filesystem extends AbstractData { switch ($namespace) { case 'purge_limiter': - opcache_invalidate($this->_path . DIRECTORY_SEPARATOR . 'purge_limiter.php'); + if (function_exists('opcache_invalidate')) { + opcache_invalidate($this->_path . DIRECTORY_SEPARATOR . 'purge_limiter.php'); + } return $this->_storeString( $this->_path . DIRECTORY_SEPARATOR . 'purge_limiter.php', '_last_cache[$key] = $value; - opcache_invalidate($this->_path . DIRECTORY_SEPARATOR . 'traffic_limiter.php'); + if (function_exists('opcache_invalidate')) { + opcache_invalidate($this->_path . DIRECTORY_SEPARATOR . 'traffic_limiter.php'); + } return $this->_storeString( $this->_path . DIRECTORY_SEPARATOR . 'traffic_limiter.php', '_last_cache, true) . ';'