PHPackages                             horde/memcache - 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. horde/memcache

ActiveLibrary[Caching](/categories/caching)

horde/memcache
==============

Memcache client library

v3.0.0(6d ago)115421LGPL-2.1PHPPHP ^8.2

Since Jun 4Pushed 1mo ago5 watchersCompare

[ Source](https://github.com/horde/Memcache)[ Packagist](https://packagist.org/packages/horde/memcache)[ Docs](https://www.horde.org/libraries/Horde_Memcache)[ RSS](/packages/horde-memcache/feed)WikiDiscussions FRAMEWORK\_6\_0 Synced today

READMEChangelog (2)Dependencies (13)Versions (13)Used By (1)

Horde\_Memcache
===============

[](#horde_memcache)

PSR-16 compliant memcache wrapper with Horde-specific extensions.

Installation
------------

[](#installation)

```
composer require horde/memcache
```

Quick Start
-----------

[](#quick-start)

```
use Horde\Memcache\{MemcacheApi, Config};

$config = new Config(
    hostspec: ['127.0.0.1'],
    port: [11211],
    prefix: 'myapp_'
);

$cache = new MemcacheApi($config);

// PSR-16 interface (standard)
$cache->set('key', 'value', 3600);
$value = $cache->get('key', 'default');
$cache->delete('key');

// Horde Extended interface (large items, multi-key)
$cache->setLarge('report', $hugeData, 3600);  // >1MB OK
$values = $cache->getItems(['k1', 'k2', 'k3']);
$cache->deleteDelayed('lock', 30);
```

Two Interfaces
--------------

[](#two-interfaces)

### PSR-16 (Standard)

[](#psr-16-standard)

`get` `set` `delete` `clear` `has` `getMultiple` `setMultiple` `deleteMultiple`

- Standard cache operations
- Items &lt; 1MB
- Framework-portable

### HordeMemcacheInterface (Extended)

[](#hordememcacheinterface-extended)

`getLarge` `setLarge` `getItems` `deleteDelayed`

- Large items (&gt;1MB auto-chunking)
- Multi-key batch retrieval
- Delete with timeout

Extensions Supported
--------------------

[](#extensions-supported)

Both **Memcache** and **Memcached** PHP extensions fully supported with equal features.

Requirements
------------

[](#requirements)

- PHP 8.1+
- memcache or memcached PHP extension
- memcached server

Documentation
-------------

[](#documentation)

- **doc/UPGRADING.md** - Migration guide from 2.x
- **src/HordeMemcacheInterface.php** - Extended API contract
- **PSR-16**:

License
-------

[](#license)

LGPL 2.1 - See LICENSE file

###  Health Score

57

↑

FairBetter than 98% of packages

Maintenance94

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community25

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 53.9% 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 ~490 days

Recently: every ~455 days

Total

10

Last Release

6d ago

Major Versions

2.1.2 → v3.0.0alpha12021-07-04

PHP version history (6 changes)2.0.6PHP &gt;=5.3.0,&lt;=6.0.0alpha1

2.1.0PHP &gt;=5.3.0,&lt;=8.0.0alpha1

2.1.2PHP ^5.3 || ^7

v3.0.0alpha1PHP ^7

v3.0.0alpha2PHP ^7 || ^8

v3.0.0beta2PHP ^8.2

### Community

Maintainers

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

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

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

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

![](https://www.gravatar.com/avatar/816e2b926f25f8cd2939054c7a7173011b4303d690e25ab61bf33cf8c7cf71ae?d=identicon)[tdannhauer](/maintainers/tdannhauer)

---

Top Contributors

[![yunosh](https://avatars.githubusercontent.com/u/379318?v=4)](https://github.com/yunosh "yunosh (90 commits)")[![slusarz](https://avatars.githubusercontent.com/u/381003?v=4)](https://github.com/slusarz "slusarz (49 commits)")[![ralflang](https://avatars.githubusercontent.com/u/646976?v=4)](https://github.com/ralflang "ralflang (17 commits)")[![mrubinsk](https://avatars.githubusercontent.com/u/66822?v=4)](https://github.com/mrubinsk "mrubinsk (9 commits)")[![joaomachado](https://avatars.githubusercontent.com/u/143567?v=4)](https://github.com/joaomachado "joaomachado (1 commits)")[![thomasjfox](https://avatars.githubusercontent.com/u/1146758?v=4)](https://github.com/thomasjfox "thomasjfox (1 commits)")

---

Tags

psr-16In Memory

### Embed Badge

![Health badge](/badges/horde-memcache/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.0k](/packages/laravel-framework)[symfony/cache

Provides extended PSR-6, PSR-16 (and tags) implementations

4.2k373.5M3.3k](/packages/symfony-cache)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69735.1M158](/packages/algolia-algoliasearch-client-php)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M573](/packages/shopware-core)

PHPackages © 2026

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