PHP Class Phalcon\Session\Adapter\Aerospike
This adapter store sessions in Aerospike
use Phalcon\Session\Adapter\Aerospike as AerospikeSession;
$session = new AerospikeSession([
'hosts' => [
['addr' => '127.0.0.1', 'port' => 3000]
],
'persistent' => true,
'namespace' => 'test',
'prefix' => 'session_',
'lifetime' => 8600,
'uniqueId' => '3Hf90KdjQ18',
'options' => [
\Aerospike::OPT_CONNECT_TIMEOUT => 1250,
\Aerospike::OPT_WRITE_TIMEOUT => 1500
]
]);
$session->start();
$session->set('var', 'some-value');
echo $session->get('var');
Datei anzeigen
Open project: phalcon/incubator
Class Usage Examples
Protected Properties
Public Methods
Method Details
__construct()
public method
Phalcon\Session\Adapter\Aerospike constructor
Gets the Aerospike instance.
public getDb ( ) : Aerospike |
return |
Aerospike |
|
Property Details
$db protected_oe property
protected Aerospike,Phalcon\Cache\Backend $db |
return |
Phalcon\Cache\Backend\Aerospike |
|
$lifetime protected_oe property
protected int $lifetime |
return |
integer |
|
$namespace protected_oe property
Default Aerospike namespace
protected string $namespace |
return |
string |
|
$prefix protected_oe property
protected string $prefix |
return |
string |
|
$set protected_oe property
The Aerospike Set for store sessions
protected string $set |
return |
string |
|