takuya / php-sysv-ipc-shm-cache
php sysv ipc cache
0.1
2025-03-06 17:07 UTC
Requires
- ext-sysvshm: *
- psr/simple-cache: ^3.0
- takuya/php-sysv-ipc-shared-memory: ^0.3
Requires (Dev)
- ext-pcntl: *
- phpunit/phpunit: ^12.0
This package is auto-updated.
Last update: 2025-03-12 01:54:14 UTC
README
This package is for caching data into SysV SharedMemory.
Installing
from Packagist
composer require takuya/php-sysv-ipc-shm-cache
from GitHub
name='php-sysv-ipc-shm-cache' composer config repositories.$name \ vcs https://github.com/takuya/$name composer require takuya/$name:master composer install
Examples
<?php $cache = new SysvShmCache('cache_name'); $cache->set($key, $data); $cache->has($key); $cache->get($key); $cache->delete($key);
'psr/simple-cache' are used.
This package is implementation of psr/simple-cache
into Shared Memory (shm_xxx
).
remove ipc by manually
If unused ipc remains. use SHELL command to remove.
ipcs -m | grep $USER | grep -oE '0x[a-f0-9]+' | xargs -I@ ipcrm --shmem-key @ ipcs -s | grep $USER | grep -oE '0x[a-f0-9]+' | xargs -I@ ipcrm --semaphore-key @