Download the PHP package kdudas/php-cache without Composer
On this page you can find all versions of the php package kdudas/php-cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download kdudas/php-cache
More information about kdudas/php-cache
Files in kdudas/php-cache
Download kdudas/php-cache
More information about kdudas/php-cache
Files in kdudas/php-cache
Vendor kdudas
Package php-cache
Short Description Simple cache implementation in php
License GPL-3.0-or-later
Package php-cache
Short Description Simple cache implementation in php
License GPL-3.0-or-later
Please rate this library. Is it a good library?
Informations about the package php-cache
php-cache
Cache implementation for php
Usage:
Prequests:
- PHP 7.2
- composer
Installing via composer:
Supperted data types:
- String
- Integer/Float/Double
- Array
- Objects
Creating a new server instance
Running the server:
OR
Note: you can modify the contents of daemon.sh
if you want to use other directories
Configuration array:
config
: Basic configuration array
--memoryLimit
: as the name suggests, after we exceed the limit, our data in the cache pool gets backed up to file system
--location
: server IP address or socket file location (string)
--port
: the port to run the sockets on (number)
--bufferSize
: how big chunks of data is being read from a stream (bytes)
--ttl
: time to live; how long an entry should take space up in the cache pool before being deleted (seconds)
--backupTime
: schedule backups (seconds)
--backupDir
: where to store backed up data? A backup is made when we are shutting down the server service, when the scheduled backup occures or our cache pool exceeded it's memory limit
--socketType
: which socket type should we use? Open a port on the network for the socket or create a file for the socket. Values must be eitherfile
(CacheIOHandler::SOCKET_TYPE_FILE
) orip
(CacheIOHandler::SOCKET_TYPE_IP
)services
: service manager configuration
--aliases
: a name assigned for a real service (Example:'cache-server' => CacheServer::class
)
--factories
: service name with factory name for service pairs
--invokables
: services with no dependencies
Creating a new client instance
You can run the client either from browser or console
CLI Commands:
./phpCache get <key>
gets entries for the specified key. If no key is specified, it returns all entries.
./phpCache set <key> <value>
pushes an entry to the cache pool with the given key - value pair.
./phpCache delete <key>
deletes the entry with the given key
All versions of php-cache with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.2
psr/container Version ^1.0
ext-sockets Version *
symfony/console Version ^4.1
phpunit/phpunit Version ^7.4
psr/container Version ^1.0
ext-sockets Version *
symfony/console Version ^4.1
phpunit/phpunit Version ^7.4
The package kdudas/php-cache contains the following files
Loading the files please wait ....