PHPackages                             truesocialmetrics/cache-storage-adapter-large-items - 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. truesocialmetrics/cache-storage-adapter-large-items

ActiveLibrary[Caching](/categories/caching)

truesocialmetrics/cache-storage-adapter-large-items
===================================================

Laminas cache adapter for large items

2.1.1(1y ago)04MITPHPPHP &gt;=8.0CI failing

Since Feb 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/truesocialmetrics/cache-storage-adapter-large-items)[ Packagist](https://packagist.org/packages/truesocialmetrics/cache-storage-adapter-large-items)[ RSS](/packages/truesocialmetrics-cache-storage-adapter-large-items/feed)WikiDiscussions master Synced 1mo ago

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

laminas-cache-storage-adapter-large-items
=========================================

[](#laminas-cache-storage-adapter-large-items)

A Laminas Cache Storage adapter that enables storing large items by automatically splitting them into smaller chunks.

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

[](#installation)

Install via composer:

```
composer require truesocialmetrics/cache-storage-adapter-large-items

```

Features
--------

[](#features)

- Transparently handles large cache items by splitting them into smaller chunks
- Compatible with any existing Laminas Cache Storage adapter
- Configurable maximum item size
- Preserves complex data structures through JSON serialization
- Automatic cleanup of chunked items on removal

Usage
-----

[](#usage)

```
$cache = new \Laminas\Cache\Storage\Adapter\Memory();
$packer = new \Twee\Cache\Storage\Adapter\Packer($cache, 1000);

$packer->setItem('large_item', ['data' => str_repeat('a', 100000)]);
$item = $packer->getItem('large_item');
var_dump($item);

```

How It Works
------------

[](#how-it-works)

The adapter automatically handles large items by:

1. Attempting to store items directly if they're under the maximum size limit
2. For larger items:
    - Splits the data into smaller chunks
    - Stores each chunk with a unique key
    - Creates an index to track all chunks
    - Automatically reassembles the data when retrieving
    - Cleans up all chunks when removing items

Configuration
-------------

[](#configuration)

OptionTypeDefaultDescriptionmaxItemSizeint300000Maximum size in bytes for a single cache itemRequirements
------------

[](#requirements)

- PHP 8.0 or later
- laminas/laminas-cache

License
-------

[](#license)

MIT License

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance43

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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 ~0 days

Total

4

Last Release

454d ago

Major Versions

1.0.0 → 2.0.02025-02-12

### Community

Maintainers

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

---

Top Contributors

[![necromant2005](https://avatars.githubusercontent.com/u/159874?v=4)](https://github.com/necromant2005 "necromant2005 (10 commits)")

---

Tags

laminascache

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/truesocialmetrics-cache-storage-adapter-large-items/health.svg)

```
[![Health](https://phpackages.com/badges/truesocialmetrics-cache-storage-adapter-large-items/health.svg)](https://phpackages.com/packages/truesocialmetrics-cache-storage-adapter-large-items)
```

###  Alternatives

[psr/simple-cache

Common interfaces for simple caching

8.1k727.3M2.1k](/packages/psr-simple-cache)[psr/cache

Common interface for caching libraries

5.2k686.9M1.3k](/packages/psr-cache)[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)

PHPackages © 2026

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