alphavel/cache
最新稳定版本:v1.0.0
Composer 安装命令:
composer require alphavel/cache
包简介
Cache package for Alphavel Framework
README 文档
README
High-performance cache layer with Redis, File, and Memory drivers
✨ Features
- ⚡ Multiple drivers - Redis, File, Memory
- 🔄 Remember pattern - Cache with fallback
- ⏰ TTL support - Automatic expiration
- 🎯 Laravel-compatible - Familiar API
- 🚀 Swoole-optimized - Coroutine-safe
📦 Installation
composer require alphavel/cache
⚙️ Configuration
CACHE_DRIVER=redis # Redis REDIS_HOST=localhost REDIS_PORT=6379 REDIS_PASSWORD= REDIS_DATABASE=0
For Docker: use service name (e.g., REDIS_HOST=redis)
🚀 Quick Start
use Cache; // Set Cache::set('key', 'value', 3600); // Get $value = Cache::get('key'); // Remember pattern $users = Cache::remember('users', 300, fn() => DB::table('users')->get() ); // Delete Cache::delete('key'); // Clear all Cache::flush();
📚 Documentation
Full documentation: https://github.com/alphavel/documentation
📄 License
MIT License
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2025-11-19