Download the PHP package libertyphp/apcu-cache without Composer
On this page you can find all versions of the php package libertyphp/apcu-cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download libertyphp/apcu-cache
More information about libertyphp/apcu-cache
Files in libertyphp/apcu-cache
Package apcu-cache
Short Description The PSR-6 and PSR-16 cache implementation using APCu. The fastest cache for PHP.
License MIT
Homepage https://github.com/vblila/libertyphp
Informations about the package apcu-cache
APCu Cache
PSR-6 and PSR-16 cache implementation using APCu. APCu is an in-memory key-value store for PHP. Keys are of type string and values can be any PHP variables.
Why APCu Cache?
Network
APCu is non-distributed cache which you can use only in HTTP request (it doesn't work in PHP CLI). If you have a web application that doesn't run on different web servers it's better to use APCu cache, because it's the simplest cache without requests over the network.
Speed
APCu is faster than Memcached and Redis. Benchmark results of setting and getting of 10000 string values (Intel Core i5-8250U, DDR4 2400MHz):
So, if your web application makes a lot of requests to the cache, it's better to have a warmed APCu cache on each worker.
Install
Docker configuration
If you use php-fpm docker add this code to install APCu in PHP:
Using PSR-6 implementation
Using PSR-16 implementation
Copyright
Copyright (c) 2022 Vladimir Lila. See LICENSE for details.
All versions of apcu-cache with dependencies
psr/cache Version ^3.0.0
psr/simple-cache Version ^3.0.0
ext-apcu Version *