PHPackages                             sopheos/pebble\_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. sopheos/pebble\_cache

ActiveLibrary[Caching](/categories/caching)

sopheos/pebble\_cache
=====================

Cache library

1.0.1(1y ago)1180MITPHPPHP &gt;=8.1.0

Since Aug 3Pushed 1y ago1 watchersCompare

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

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

Pebble/Cache
============

[](#pebblecache)

Système de de mise en cache.

CacheInterface
--------------

[](#cacheinterface)

- `start(): static` Démarre le service
- `close(): static` Stop le service
- `set(string $key, $value, int $expiration = 0): static` Ajoute une donnée.
- `setMulti(array $items, int $expiration = 0): static` Ajoute un ensemble de données.
- `delete(string $key): static` Supprime une donnée.
- `get(string $key): mixed` Récupère une donnée
- `getMulti(array $keys): array` Récupère un ensemble de données.
- `increment(string $key, int $expiration = 0, int $offset = 1): static` : Incrémente une valeur. (Vaut `$offset` si n'existe pas.)
- `decrement(string $key, int $expiration = 0, int $offset = 1): static` : Décrémente une valeur. (Vaut `- $offset` si n'existe pas.)

MemCache
--------

[](#memcache)

- Implémente `CacheInterface`.
- Se connecte à un serveur Memcached.

MicroCache
----------

[](#microcache)

- Implémente `CacheInterface`.
- Conserve les données en cache uniquement le temps de l'execution du script.
- L'expiration des méthodes n'a pas d'effet.

SessionHandler
--------------

[](#sessionhandler)

- Implémente `SessionHandlerInterface`.
- Permet de stocker les sessions dans un `CacheInterface`.

RateLimit
---------

[](#ratelimit)

Antispam qui stocke les tentatives dans un `CacheInterface`.

Utilise le principe de Token bucket : [https://en.wikipedia.org/wiki/Token\_bucket](https://en.wikipedia.org/wiki/Token_bucket)

- `__construct(CacheInterface $cache, string $name, int $max, int $period)` Crée un `RateLimit` :
    - `$name` : Nom
    - `$max` : Stock initial
    - `$period` : Période en secondes avant réinitialisation partiel du stock
- `hit(int $use = 1): bool` : Consomme `$use` éléments du stock et vérifie que le stock est toujours plein.
- `stock(): int` Récupère le stock courant.
- `purge()` Réinitialise le stock.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Every ~132 days

Total

4

Last Release

622d ago

Major Versions

0.0.3 → 1.0.12024-09-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/e5a5482c3c1b25e5c39c23177570691f1e625aa5c094dc5dce45284b90409910?d=identicon)[sopheos](/maintainers/sopheos)

---

Top Contributors

[![sugatasei](https://avatars.githubusercontent.com/u/6987162?v=4)](https://github.com/sugatasei "sugatasei (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laminas/laminas-cache

Caching implementation with a variety of storage options, as well as codified caching strategies for callbacks, classes, and output

1076.9M130](/packages/laminas-laminas-cache)[cache/adapter-common

Common classes for PSR-6 adapters

11124.4M38](/packages/cache-adapter-common)[cache/filesystem-adapter

A PSR-6 cache implementation using filesystem. This implementation supports tags

705.8M82](/packages/cache-filesystem-adapter)[cache/array-adapter

A PSR-6 cache implementation using a php array. This implementation supports tags

548.3M151](/packages/cache-array-adapter)[cache/redis-adapter

A PSR-6 cache implementation using Redis (PhpRedis). This implementation supports tags

523.9M27](/packages/cache-redis-adapter)[cache/simple-cache-bridge

A PSR-6 bridge to PSR-16. This will make any PSR-6 cache compatible with SimpleCache.

423.1M27](/packages/cache-simple-cache-bridge)

PHPackages © 2026

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