PHPackages                             onoi/blob-store - 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. [Database &amp; ORM](/categories/database)
4. /
5. onoi/blob-store

ActiveLibrary[Database &amp; ORM](/categories/database)

onoi/blob-store
===============

A simple interface to manage schema-free temporal persistent key/values

1.2.1(9y ago)1511.2k↑113.1%3GPL-2.0+PHPPHP &gt;=5.3.2

Since Jun 2Pushed 8y ago1 watchersCompare

[ Source](https://github.com/onoi/blob-store)[ Packagist](https://packagist.org/packages/onoi/blob-store)[ Docs](https://github.com/onoi/blob-store)[ RSS](/packages/onoi-blob-store/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (5)Used By (3)

Blob store
==========

[](#blob-store)

[![Build Status](https://camo.githubusercontent.com/9dfd19433c7d527dc07891c97ff91b29d9a81c7eb099dcae9afef00a3bca1d77/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6f6e6f692f626c6f622d73746f72652e7376673f6272616e63683d6d6173746572)](http://travis-ci.org/onoi/blob-store)[![Code Coverage](https://camo.githubusercontent.com/9df41fc23aba2159bd191348c601a7fcf5412d2b9d305bc4acc438f98eb48391/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f6e6f692f626c6f622d73746f72652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/onoi/blob-store/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/374baca0e2e4bcd4c1709aabdebf95491f3bf41550f02eaef52b211698423ae8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f6e6f692f626c6f622d73746f72652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/onoi/blob-store/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/ebe88d61e7f58a2ea3b150ebf0892d4d1fd4cc4f4d3fd522f026c86fc6172a0d/68747470733a2f2f706f7365722e707567782e6f72672f6f6e6f692f626c6f622d73746f72652f76657273696f6e2e706e67)](https://packagist.org/packages/onoi/blob-store)[![Packagist download count](https://camo.githubusercontent.com/82708f698620550d1f083b047bbbcf6cbdbd091bb779cef2d4547261d459fcae/68747470733a2f2f706f7365722e707567782e6f72672f6f6e6f692f626c6f622d73746f72652f642f746f74616c2e706e67)](https://packagist.org/packages/onoi/blob-store)[![Dependency Status](https://camo.githubusercontent.com/fe9f292052a4c6e133215212bfe67c4c444c2edad1e292c5e679de10971334ca/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7068702f6f6e6f693a626c6f622d73746f72652f62616467652e706e67)](https://www.versioneye.com/php/onoi:blob-store)

A simple interface to manage schema-free temporal persistent key/values. This was part of the [Semantic MediaWiki](https://github.com/SemanticMediaWiki/SemanticMediaWiki/) code base and is now being deployed as independent library.

It is suggested to use either redis, riak, or mongodb as back-end provider depending on the use case.

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

[](#requirements)

- PHP 5.3 or later
- Onoi/Cache ~1.1

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

[](#installation)

The recommended installation method for this library is by either adding the dependency to your [composer.json](https://getcomposer.org/).

```
{
	"require": {
		"onoi/blob-store": "~1.2"
	}
}
```

Usage
-----

[](#usage)

```
class Foo {

	private $blobStore;

	public function __construct( BlobStore $blobStore ) {
		$this->blobStore = $blobStore;
	}

	public function doSomethingFor( $id ) {
		$container = $this->blobStore->read( md5( $id ) );

		$container->set( 'one', array( new \stdClass, 'Text' ) );

		$container->append(
			'one',
			new \stdClass
		);

		$container->delete( 'two' );

		$this->blobStore->save( $container );
	}
}
```

```
$cacheFactory = new CacheFactory();

$compositeCache = $cacheFactory->newCompositeCache( array(
	$cacheFactory->newFixedInMemoryLruCache(),
	$cacheFactory->newDoctrineCache( new \Doctrine\Common\Cache\RedisCache( ... ) )
) );

or

$compositeCache = $cacheFactory->newCompositeCache( array(
	$cacheFactory->newFixedInMemoryLruCache(),
	$cacheFactory->newMediaWikiCache( \ObjectCache::getInstance( 'redis' ) )
) );

$blobStore = new BlobStore( 'foo', $compositeCache );

$instance = new Foo( $blobStore );
$instance->doSomethingFor( 'bar' );
```

When creating an instance a namespace is required to specify the context of the storage in case the `BlobStore` is used for different use cases.

Contribution and support
------------------------

[](#contribution-and-support)

If you want to contribute work to the project please subscribe to the developers mailing list and have a look at the [contribution guidelinee](/CONTRIBUTING.md). A list of people who have made contributions in the past can be found [here](https://github.com/onoi/blob-store/graphs/contributors).

- [File an issue](https://github.com/onoi/blob-store/issues)
- [Submit a pull request](https://github.com/onoi/blob-store/pulls)

### Tests

[](#tests)

The library provides unit tests that covers the core-functionality normally run by the [continues integration platform](https://travis-ci.org/onoi/blob-store). Tests can also be executed manually using the `composer phpunit` command from the root directory.

### Release notes

[](#release-notes)

- 1.2.0 (2016-03-19)

- Added `Container::addToLinkedList` to maintain a linked list of interdependent containers (if the original container is removed then all linked containers will be expunged as well)

- 1.1.0 (2015-06-13)

- Removed tracking of internal ID list
- Added `Container::setExpiryInSeconds`

- 1.0.0 (2015-06-02)

- Initial release

License
-------

[](#license)

[GNU General Public License 2.0 or later](https://www.gnu.org/copyleft/gpl.html).

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 94.7% 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 ~134 days

Total

4

Last Release

3600d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/511b3dbc1a73ad7b69118e540b16c8bcc2ac5f923022b94aa61a8d71af612f9c?d=identicon)[onoi](/maintainers/onoi)

---

Top Contributors

[![mwjames](https://avatars.githubusercontent.com/u/1245473?v=4)](https://github.com/mwjames "mwjames (18 commits)")[![kghbln](https://avatars.githubusercontent.com/u/1104078?v=4)](https://github.com/kghbln "kghbln (1 commits)")

---

Tags

messages

### Embed Badge

![Health badge](/badges/onoi-blob-store/health.svg)

```
[![Health](https://phpackages.com/badges/onoi-blob-store/health.svg)](https://phpackages.com/packages/onoi-blob-store)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90440.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

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