Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/detain/session-samurai
🥷 Universal high-speed asynchronous (non-blocking) SessionHandlerInterface implementation for PHP supporting Semaphores, Mysqli, Redis, SQLite3, Symfony/Cache, WinCache, PhpFastCache, PHP-Cache, PDO, Memcached, FlySystem Filesystem, Illuminate, APCu, APC, OpCache, InfluxDB, WinCache, MongoDb and local file storage.
https://github.com/detain/session-samurai
asynchronous flysystem memcached mongodb mysql mysqli non-blocking pdo php php-cache phpfastcache redis semaphore session session-management sessionhandler sessionhandlerinterface sqlite3 symfony-cache wincache
Last synced: about 4 hours ago
JSON representation
🥷 Universal high-speed asynchronous (non-blocking) SessionHandlerInterface implementation for PHP supporting Semaphores, Mysqli, Redis, SQLite3, Symfony/Cache, WinCache, PhpFastCache, PHP-Cache, PDO, Memcached, FlySystem Filesystem, Illuminate, APCu, APC, OpCache, InfluxDB, WinCache, MongoDb and local file storage.
- Host: GitHub
- URL: https://github.com/detain/session-samurai
- Owner: detain
- License: gpl-3.0
- Created: 2023-02-16T16:46:44.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-03T09:10:45.000Z (10 months ago)
- Last Synced: 2024-11-14T12:08:20.229Z (5 days ago)
- Topics: asynchronous, flysystem, memcached, mongodb, mysql, mysqli, non-blocking, pdo, php, php-cache, phpfastcache, redis, semaphore, session, session-management, sessionhandler, sessionhandlerinterface, sqlite3, symfony-cache, wincache
- Language: PHP
- Homepage:
- Size: 154 KB
- Stars: 8
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Session Samurai 🥷
[![check](https://github.com/detain/session-samurai/actions/workflows/check.yml/badge.svg)](https://github.com/detain/session-samurai/actions/workflows/check.yml)
Universal high-speed asynchronous (non-blocking) SessionHandlerInterface implementation for PHP supporting Semaphores, Mysqli, Redis, SQLite3, Symfony/Cache, WinCache, PhpFastCache, PHP-Cache, PDO, Memcached, FlySystem Filesystem, Illuminate, APCu, APC, OpCache, InfluxDB, WinCache, MongoDb and local file storage.
"_Session handling is like a sword fight_
_You must think first before you move_
_When it's properly used it's almost invincible_"## Project Status
*Session Samurai 🥷* is fresh off the block and is still figuring out what it wants to do with its life. Soon it will grow into a mega-hotie that does the same stuff others do, only he makes it look good.
## Installation
Use [composer](http://getcomposer.org/) to include the save handler in your application.
```bash
composer requre detain/session-samurai
```## Usage
```php
require 'vendor/autoload.php'; // set up autoloading using composer$memcached = new \Memcached(); // create connection to memcached
$memcached->addServer('localhost', 11211);
$handler = new \Detain\SessionSamurai\MemcachedSessionHandler($memcached);
session_set_save_handler($handler, true);
```## Development notes
### Related sites with possibly good reference material
* [PHP: SessionHandlerInterface](https://www.php.net/manual/en/class.sessionhandlerinterface.php) - Manual
* [PHP: session_set_save_handler](https://www.php.net/manual/en/function.session-set-save-handler.php) - Manual
* [PHP: Securing Session INI Settings](https://www.php.net/manual/en/session.security.ini.php) - Manual
* [Session Handler Life Cycle](https://gist.github.com/franksacco/d6e943c41189f8ee306c182bf8f07654): A complete overview of the php session handler life cycle]
* [1ma/RedisSessionHandler](https://github.com/1ma/RedisSessionHandler): An alternative Redis session handler for PHP featuring per-session locking and session fixation protection
* [cballou/MongoSession](https://github.com/cballou/MongoSession): A PHP session handler wrapped around MongoDB.
* [josantonius/php-session](https://github.com/josantonius/php-session): PHP library for handling sessions
* [psr7-sessions/storageless](https://github.com/psr7-sessions/storageless): storage-less PSR-7 session support
* [ramazancetinkaya/session-handler](https://github.com/ramazancetinkaya/session-handler): A PHP library for secure session handling.
* [davidlienhard/sessionhandler](https://github.com/davidlienhard/sessionhandler): 🐘 php sessionhandler using database connection
* [zahycz/sessionless](https://github.com/zahycz/sessionless): Non-I/O blocking SessionHandler implementation using Nette/Caching
* [javis/php-memcached-sessions](https://github.com/javis/php-memcached-sessions): A PHP session handler that uses memcached to store session with multiple servers, failover and replication support.
* [PHP Cache](https://www.php-cache.com/en/latest/) - PHP-Cache Documentation
* [The Cache Component](https://symfony.com/doc/current/components/cache.html#available-cache-adapters) (Symfony Docs)
* [The Lock Component](https://symfony.com/doc/current/components/lock.html#available-stores) (Symfony Docs)