PHPackages                             alphavel/cache - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. alphavel/cache

ActiveLibrary[Caching](/categories/caching)

alphavel/cache
==============

Cache package for Alphavel Framework

v1.0.0(5mo ago)01MITPHPPHP &gt;=8.4

Since Nov 26Pushed 5mo agoCompare

[ Source](https://github.com/alphavel/cache)[ Packagist](https://packagist.org/packages/alphavel/cache)[ RSS](/packages/alphavel-cache/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Alphavel Cache
==============

[](#alphavel-cache)

> High-performance cache layer with Redis, File, and Memory drivers

[![PHP Version](https://camo.githubusercontent.com/9c2f8ad80d34105266a94c4c06234f8ed18c968d3595039c2d9a7becd1e71c8b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e342d626c75652e737667)](https://php.net)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)

---

✨ Features
----------

[](#-features)

- ⚡ **Multiple drivers** - Redis, File, Memory
- 🔄 **Remember pattern** - Cache with fallback
- ⏰ **TTL support** - Automatic expiration
- 🎯 **Laravel-compatible** - Familiar API
- 🚀 **Swoole-optimized** - Coroutine-safe

📦 Installation
--------------

[](#-installation)

```
composer require alphavel/cache
```

⚙️ Configuration
----------------

[](#️-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
-------------

[](#-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
---------------

[](#-documentation)

**Full documentation**:

- [Getting Started](https://github.com/alphavel/documentation/blob/master/packages/cache/README.md)
- [Drivers](https://github.com/alphavel/documentation/blob/master/packages/cache/drivers.md)
- [Best Practices](https://github.com/alphavel/documentation/blob/master/packages/cache/best-practices.md)

📄 License
---------

[](#-license)

MIT License

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance70

Regular maintenance activity

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

173d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/51c953df141d0cfd39946d3e417b2eb3106d96170c62c4c908a6cc0b75352883?d=identicon)[arthur4weber](/maintainers/arthur4weber)

---

Top Contributors

[![arthur2weber](https://avatars.githubusercontent.com/u/9046093?v=4)](https://github.com/arthur2weber "arthur2weber (15 commits)")

---

Tags

rediscachememcachedalphavel

### Embed Badge

![Health badge](/badges/alphavel-cache/health.svg)

```
[![Health](https://phpackages.com/badges/alphavel-cache/health.svg)](https://phpackages.com/packages/alphavel-cache)
```

###  Alternatives

[tedivm/stash

The place to keep your cache.

9824.8M124](/packages/tedivm-stash)[tedivm/stash-bundle

Incorporates the Stash caching library into Symfony.

841.4M16](/packages/tedivm-stash-bundle)[aplus/cache

Aplus Framework Cache Library

161.6M4](/packages/aplus-cache)[robinn/phpcacheadmin

A web dashboard for your favorite caching system.

4441.1k1](/packages/robinn-phpcacheadmin)[ihor/cachalot

Cache a lot in a proper way (APC, XCache, Memcached, Redis, Couchbase)

2528.1k](/packages/ihor-cachalot)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
