🚀 A High speed , PSR-16 compatible cache library based on swoole-tables 🚀
🇮🇳 Made in India 🇮🇳
🇮🇳 Made in India 🇮🇳
Swoole cache requires open-swoole extension to be installed follow this guide to install open-swoole,
You can install Swoole cache via Composer. If you don't have composer installed , you can download composer from here
composer install scrawler/swoole-cache
This is a fully compatible PSR-16 cache and uses all the PSR 16 methods
include __DIR__.'/../vendor/autoload.php';
//Setup (parameter $size is optional)
$cache = new SwooleCache(10);
$key = "name";
$value = "Pranjal";
// set key value pair in in cache
$cache->set($key, $value);
// get value from key
$cache->get($key);
// delete value using key
cache->delete($key);
// Set multiples values
$datas = [
"user_one" => "Pranjal",
"user_two" => "Raj"
];
$cache->setMultiple($datas);
// Set multiple values
$cache->setMultiple($datas);
// Get multiple values
$cache->getMultiple(["user_one", "user_two"])
// Clear complete cache
$cache->clear();
Swoole Cache is created by Pranjal Pandey and released under the Apache 2.0 License.