PHPackages                             atk14/session-storer - 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. atk14/session-storer

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

atk14/session-storer
====================

A library for storing sessions in database used in the ATK14 Framework

v1.2.2(2mo ago)02352MITPHPPHP &gt;=5.6.0

Since Sep 4Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/atk14/SessionStorer)[ Packagist](https://packagist.org/packages/atk14/session-storer)[ Docs](https://github.com/atk14/SessionStorer)[ RSS](/packages/atk14-session-storer/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (11)Versions (7)Used By (2)

SessionStorer
=============

[](#sessionstorer)

A library for storing sessions in a database, used in the [ATK14 Framework](https://github.com/atk14).

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

[](#installation)

```
composer require atk14/session-storer
```

Basic usage
-----------

[](#basic-usage)

```
$session = new SessionStorer();

$session->writeValue("user_id", 42);
$user_id = $session->readValue("user_id"); // 42
```

Sessions cleanup (cron job)
---------------------------

[](#sessions-cleanup-cron-job)

Old sessions can be cleaned up by calling the static method `DeleteOldSessions()`. It is suitable for use in a cron job (e.g. `sessions_cleanup` running once a day):

```
$deleted = SessionStorer::DeleteOldSessions([
    "session_name" => "session",
    "max_lifetime" => 60 * 60 * 24, // 1 day
]);
```

Available options:

OptionDefaultDescription`dbmole`autodbmole instance; auto-detected from globals or singleton if not provided`current_time``time()`Unix timestamp to use as "now"`session_name``null`if set together with `max_lifetime`, deletes expired sessions by name`max_lifetime``null`session lifetime in seconds`deep_clean``true`if true, also deletes all sessions older than 2 yearsThe method returns the total count of deleted records.

License
-------

[](#license)

MIT

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance86

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity47

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

Total

5

Last Release

66d ago

PHP version history (2 changes)v1.0PHP &gt;=5.3.0

v1.1PHP &gt;=5.6.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/974278?v=4)[Jaromir Tomek](/maintainers/yarri)[@yarri](https://github.com/yarri)

---

Top Contributors

[![yarri](https://avatars.githubusercontent.com/u/974278?v=4)](https://github.com/yarri "yarri (29 commits)")

---

Tags

sessionatk14

### Embed Badge

![Health badge](/badges/atk14-session-storer/health.svg)

```
[![Health](https://phpackages.com/badges/atk14-session-storer/health.svg)](https://phpackages.com/packages/atk14-session-storer)
```

###  Alternatives

[aplus/session

Aplus Framework Session Library

2211.6M3](/packages/aplus-session)[apix/cache

A thin PSR-6 cache wrapper with a generic interface to various caching backends emphasising cache taggging and indexing to Redis, Memcached, PDO/SQL, APC and other adapters.

117548.2k6](/packages/apix-cache)[stefangabos/zebra_session

A drop-in replacement for PHP's default session handler which stores session data in a MySQL database, providing better performance, better security and protection against session fixation and session hijacking

174116.9k2](/packages/stefangabos-zebra-session)[jenssegers/mongodb-session

A MongoDB session driver for Laravel 4, 5, 6, 7 and 8

75314.1k3](/packages/jenssegers-mongodb-session)[cache/cache-bundle

Symfony 2 bundle providing integration between PSR-6 compliant cache services and the framework. It supports cache for sessions, routing and Doctrine

43440.2k](/packages/cache-cache-bundle)[ytake/laravel-couchbase

Couchbase providers for Laravel

3052.3k](/packages/ytake-laravel-couchbase)

PHPackages © 2026

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