PHPackages                             aerospike/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. [Caching](/categories/caching)
4. /
5. aerospike/store

ActiveLibrary[Caching](/categories/caching)

aerospike/store
===============

A custom session handler backed by Aerospike for PHP 5.4

v0.1.0(11y ago)1312[1 issues](https://github.com/amirrf/aerospike-store-php/issues)Apache-2.0PHPPHP &gt;=5.4.0

Since Nov 22Pushed 11y ago1 watchersCompare

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

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

Aerospike::Store for PHP
========================

[](#aerospikestore-for-php)

Use Aerospike as session store for PHP. Aerospike easily scales up, and besides RAM it also supports SSD for persistency in a highly optimized architecture. This session handler supports auto expiration of sessions at database level. Find out more about [Aerospike](http://www.aerospike.com).

Dependencies
------------

[](#dependencies)

- It is written for PHP 5.4 and above.
- [Aerospike PHP Client](https://github.com/aerospike/aerospike-client-php): Using [Composer](https://getcomposer.org/) the dependency will be installed automatically.

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

[](#installation)

### Using Composer

[](#using-composer)

```
$ composer require aerospike/store "*"

```

### Manually

[](#manually)

Download and use `AerospikeSessionHandler.php`.

Usage
-----

[](#usage)

Auto-load or:

```
require 'AerospikeSessionHandler.php';
```

Create an instance of `AerospikeSessionHandler` and set it as session handler:

```
$Handler = new AerospikeSessionHandler();
session_set_save_handler($Handler);
session_start();
```

It is possible to pass a custom client instance:

```
$db = new Aerospike(["hosts" => [["addr" => "127.0.0.1", "port" => 3000]]]);
$Handler = new AerospikeSessionHandler($db);
```

And also a custom set of options:

```
$Handler = new AerospikeSessionHandler(NULL, array(
	'addr' => '127.0.0.1',
	'port' => 3000,
	'ns' => 'test',
	'set' => 'session',
	'bin' => 'data',
	'ttl' => 3600 // defualt = session.gc_maxlifetime
));
```

Single-Bin
----------

[](#single-bin)

By default an Aerospike namespace supports multiple `bins` per key. As the session store only use a single bin for stroing data, it is recommended to to enable `single-bin` option in namespace configuration for higher performance.

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

[](#contributing)

1. Fork it (  )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

License
-------

[](#license)

The Aerospike-Store-PHP is made available under the terms of the Apache License, Version 2, as stated in the file `LICENSE`.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

4188d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5339eb45d3df661579db2322a92d09d82ee03301526832a24567d972ff052537?d=identicon)[amirrf](/maintainers/amirrf)

---

Top Contributors

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

---

Tags

sessionaerospike

### Embed Badge

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

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

###  Alternatives

[duncan3dc/helpers

A collection of useful helper classes

13188.0k](/packages/duncan3dc-helpers)[jrschumacher/symfony-redis-session-handler

Redis Session Handler Symfony HttpFoundation Component

1261.1k](/packages/jrschumacher-symfony-redis-session-handler)[karriere/state

Laravel package for storing current application state in cache/session

1718.5k](/packages/karriere-state)[craftsys/laravel-redis-session-enhanced

Enhanced redis driver for sessions in Laravel

106.6k](/packages/craftsys-laravel-redis-session-enhanced)[dmitry-suffi/redis-session-handler

Обработчик сессий через Redis с механизмом блокировки

112.9k](/packages/dmitry-suffi-redis-session-handler)[makbulut/laravel-aerospike

Aerospike cache driver for Laravel

102.2k](/packages/makbulut-laravel-aerospike)

PHPackages © 2026

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