Yac can be installed in one of three ways: via PECL, via PIE, or by building it from source.
Questa estensione » PECL non è incorporata nel PHP.
Informazioni per l'installazione di questa estensione PECL possono essere trovate nel capitolo del manuale intitolato Installazione delle estensioni PECL. Informazioni aggiuntive come nuove release, download, file sorgenti, informazioni del manutentore e un CHANGELOG possono essere trovate qui: » https://pecl.php.net/package/yac.
Windows binaries (DLL files) for this PECL extension are available from the PECL website.
Example #1 Installing Yac with PECL
pecl install yac
As of Yac 2.3.2, the extension can be installed with » PIE, the PHP Installer for Extensions, by running the following on the command line.
Example #2 Installing Yac with PIE
pie install laruence/yac
Optional serializers can be enabled at install time:
Example #3 Installing Yac with PIE and a serializer
pie install laruence/yac --enable-json
The source code is hosted on » GitHub. To build the extension from source, run the following on the command line, replacing the paths with those of the local PHP installation.
Example #4 Building Yac from source
/path/to/phpize ./configure --with-php-config=/path/to/php-config make && make install
The following configure options are available:
Values are compressed with LZ4 before being stored. The LZ4
compression backend was introduced in Yac 2.4.0, replacing the
earlier FastLZ. By default, Yac uses the LZ4 copy bundled with the
extension; no extra flag is needed. To link against the system LZ4
library instead, use the
--with-system-lz4 switch, which
requires the lz4.h header and
liblz4 to be installed.
Alternative serializers can be compiled in with --enable-json, --enable-msgpack or --enable-igbinary, which register the corresponding extension as an optional dependency. The serializer used at runtime is selected with the yac.serializer ini directive.