Releases: infocyph/CacheLayer
Releases · infocyph/CacheLayer
1.01
1.0
🎉 Initial Release
We're excited to announce the first stable release of CacheLayer, a standalone cache toolkit for modern PHP applications.
CacheLayer was separated from the Intermix project to provide better focus on caching functionality and faster feature development.
✨ Key Features
- Unified API: Implements PSR-6, PSR-16,
ArrayAccess, andCountableinterfaces - Multiple Adapters: Support for APCu, File, PHP Files, Memcached, Redis, Redis Cluster, PDO (SQLite), Shared Memory, MongoDB, DynamoDB, and S3
- Tagged Invalidation: Versioned tag support with
setTagged(),invalidateTag(), andinvalidateTags()methods - Stampede Protection: Safe
remember()method with pluggable lock providers - Metrics & Monitoring: Per-adapter metrics counters and export hooks
- Compression Support: Configurable payload compression
- Serialization Helpers: Value serializer for closures and resources
- Memoization: Helper methods including
memoize(),remember(), andonce()
📋 Requirements
- PHP 8.3 or higher
- Composer
- Optional extensions depending on adapter choice (ext-apcu, ext-redis, ext-memcached, ext-pdo, ext-sysvshm, etc.)
🚀 Quick Start
use Infocyph\CacheLayer\Cache\Cache;
$cache = Cache::pdo('app'); // defaults to sqlite
$cache->setTagged('user:1', ['name' => 'Ada'], ['users'], 300);
$user = $cache->remember('user:1', function ($item) {
$item->expiresAfter(300);
return ['name' => 'Ada'];
}, tags: ['users']);
$cache->invalidateTag('users');📚 Documentation
Full documentation is available at: https://docs.infocyph.com/projects/CacheLayer
🛠 Installation
composer require infocyph/cachelayer📄 License
MIT License - See LICENSE for details.
Thanks for using CacheLayer! Please report issues and share your feedback on GitHub.