beauty-framework/tarantool-support
Composer 安装命令:
composer require beauty-framework/tarantool-support
包简介
Beauty Tarantool support
README 文档
README
Welcome to the most "unconventional" cache driver you didn't know you wanted! 🎉
Yes, we're using Tarantool — that speedy, Lua-powered in-memory database — as a cache backend.
Because why use Redis when you can have a Tarantool? Ha-ha 😜
Installation
composer require beauty-framework/tarantool-support
Configuration
Configure your cache driver like this:
return [ 'default' => 'tarantool', 'stores' => [ 'tarantool' => [ 'driver' => 'tarantool', 'host' => '127.0.0.1', 'port' => 3301, 'user' => 'guest', 'password' => null, 'space' => 'cache', ], ], ];
And in \App\Container\Cache::configure add Tarantool Driver:
$factory = new CacheFactory([ new RedisCacheDriver(), new KVCacheDriver(), new ArrayCacheDriver(), new FileCacheDriver(), new LruCacheDriver(), new \Beauty\Tarantool\Driver\TarantoolCacheDriver(), // <-- this ]);
Note: The DSN connection string only includes host, port, user, and password. The
spaceis the logical "table" name inside Tarantool where cache items live, and it's handled internally.
How It Works
- Keys and values are stored as tuples in the Tarantool space.
- Every cache entry is a tuple
{ key, value }. - Operations like
set,get,deletemap to Tarantool'sreplace,get, anddeletecalls respectively.
Just don’t ask about TTL — this isn’t your grandma’s Redis.
Testing
To test locally, run Tarantool with our init script:
docker run -d --name tarantool -p 3301:3301 -v $(pwd)/init.lua:/init.lua tarantool/tarantool tarantool /init.lua
init.lua sets up the cache space with the proper format:
print("[init] Tarantool script running!") box.cfg{} box.schema.user.grant('guest', 'read,write,execute', 'universe', nil, { if_not_exists = true }) local space = box.schema.space.create('cache', { if_not_exists = true }) space:format({ { name = 'key', type = 'string' }, { name = 'value', type = 'any', is_nullable = true } }) space:create_index('primary', { parts = { 'key' }, if_not_exists = true }) print("[init] Tarantool cache space created!")
Or,
cd tests
./start-tarantool.sh
cd ../
./vendor/bin/phpunit
A Word of Caution
Using Tarantool as a cache backend is like bringing a rocket launcher to a water balloon fight — overkill, fun, and totally unexpected.
But hey, if you want blazing speed, Lua scripting, and a database that can do everything except maybe your laundry, Tarantool’s your pal.
License
MIT
beauty-framework/tarantool-support 适用场景与选型建议
beauty-framework/tarantool-support 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 06 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「tarantool」 「cockroachdb」 「beauty」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 beauty-framework/tarantool-support 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 beauty-framework/tarantool-support 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 beauty-framework/tarantool-support 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A collection of helpers for PHPUnit to ease testing Tarantool libraries.
PHP Object Mapper for Tarantool.
$queue->push('I can be popped off after', '10 minutes');
Simple CockroachDB driver for Laravel 6+
CockroachDB driver for Lumen 8
Symfony lock Tarantool store
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-06-20