class DynamoDbSession (View source)

Properties

protected DynamoDbClient $client
protected string $table

Name of DynamoDB table to store sessions in

protected SessionHandler $handler

Methods

public
SessionHandler
getHandler()

No description

public
DynamoDbClient
getClient()

No description

public static 
get()

Get an instance of DynamoDbSession configured from the environment if available.

public
__construct(array $options, string $table)

No description

protected
int
getSessionLifetime()

Check the AWS constant or refer to the Session class to find the session timeout value (if it exists) in terms of DynamoDB, session_lifetime is the time to mark the inactive session to be garbage collected.

public
register()

Register DynamoDB as the session handler.

Details

SessionHandler getHandler()

No description

Return Value

SessionHandler

DynamoDbClient getClient()

No description

Return Value

DynamoDbClient

static DynamoDbSession|null get()

Get an instance of DynamoDbSession configured from the environment if available.

Return Value

DynamoDbSession|null

__construct(array $options, string $table)

No description

Parameters

array $options
string $table

protected int getSessionLifetime()

Check the AWS constant or refer to the Session class to find the session timeout value (if it exists) in terms of DynamoDB, session_lifetime is the time to mark the inactive session to be garbage collected.

If GarbageCollectSessionCronTask is running periodically on your server (e.g. via the silverstripe-crontask module), then the inactive session will get removed from the DynamoDB session table.

Return Value

int

register()

Register DynamoDB as the session handler.