PHPackages                             oleku/mcache - 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. oleku/mcache

AbandonedArchivedLibrary[Caching](/categories/caching)

oleku/mcache
============

Simple class that extends memcache to allow data larger than 1MB.

42492PHP

Since Jun 1Pushed 12y ago2 watchersCompare

[ Source](https://github.com/olekukonko/MultipartCache)[ Packagist](https://packagist.org/packages/oleku/mcache)[ RSS](/packages/oleku-mcache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

MultipartCache
==============

[](#multipartcache)

This a simple class that extends `PHP` memcache to support saving data larger than `1MB`.

##### Example 1 ;

[](#example-1-)

```
$largeSet = range(0, 100000);
$key = "largeSet";

$cache = new Mcache\Main();
$cache->addserver("127.0.0.1"); // add memecache server
$cache->addserver("54.234.98.140:49226"); //Free server from www.memcachedasaservice.com

$cache->setLimit(1024); 		// Set smaller limit to for testing
$cache->set($key, $largeSet);	// Go get the data
```

If you just want to see details of how it was saved use `Mcache\Main::getDetails()`

```
print_r($cache->getDetails($key));
```

###### Sample Output

[](#sample-output)

```
{
    "type": "array",
    "sha1": "9959bd9fa94479fcda3f82825a269970b4517cb1",
    "md5": "e25c88f7a6e171ece40495ce00239f9f",
    "length": 588898,
    "slice": 576,
    "time": "Sat, 01 Jun 2013 21:55:21 +0200"
}

```

- Total data length `588898`
- System split this data into `576` slices
- You can also see the time the data was saved

*Note that `Mcache\Main::getDetails()` would only have information of any data grater than the limit set. This was implement for performance reasons*

To get the stored information just use normal `memcache` methods since `Mcache\Main` extends `memcache`

```
$dataFromCache = $cache->get($key);
```

##### Example 2

[](#example-2)

```
$key = "largeImage";
$cache = new Mcache\Main();
$cache->addserver("127.0.0.1");  // Local memecache server
$cache->addserver("X.X.X.X"); //Free server from www.memcachedasaservice.com

$cache->set($key, file_get_contents("large_image.jpg"));

header("Content-Type: image/jpeg");
echo $cache->get($key);
```

#### Licence [MIT](http://opensource.org/licenses/MIT)

[](#licence-mit)

```
Copyright (c) 2013 Oleku Konko

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/66f7aef00ebf1d73a2c6821dc82942a1e7d17df84fc8ffe15d6536f29d2d4fb4?d=identicon)[oleku](/maintainers/oleku)

---

Top Contributors

[![olekukonko](https://avatars.githubusercontent.com/u/2615393?v=4)](https://github.com/olekukonko "olekukonko (1 commits)")

### Embed Badge

![Health badge](/badges/oleku-mcache/health.svg)

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

###  Alternatives

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)

PHPackages © 2026

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