Skip to content

Releases: infocyph/CacheLayer

1.01

13 Apr 04:50
1c9fa2b

Choose a tag to compare

What's Changed

Full Changelog: 1.0...1.01

1.0

12 Apr 10:08
a9b889c

Choose a tag to compare

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, and Countable interfaces
  • 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(), and invalidateTags() 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(), and once()

📋 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.