Skip to content

Commit

Permalink
Merge pull request #9 from dhensby/pulls/fix-docs
Browse files Browse the repository at this point in the history
DOCS Renaming incorrect constant
  • Loading branch information
Stig Lindqvist committed Nov 23, 2015
2 parents 61ff3a7 + 6373663 commit b154256
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@ If you wish to store sessions in DynamoDB, set the following environment variabl

// the name of the DynamoDB table to store sessions in
define('AWS_DYNAMODB_SESSION_TABLE', 'mysession');

// the region that the DynamoDB table will live in (in this example here it uses Sydney)
define('AWS_REGION_NAME', 'ap-southeast-2');

Once these are in place, this module will configure DynamoDB and register that as the session handler.
You will **need** to create the specified table using the AWS DynamoDB console for the region.

## Using DynamoDB outside of AWS

Sometimes you'll want to test that DynamoDB sessions work on your local development environment. You can make that
happen by defining `AWS_ACCESS_KEY` and `AWS_ACCESS_SECRET`. Please don't define these constants in the environment file
happen by defining `AWS_ACCESS_KEY` and `AWS_SECRET_KEY`. Please don't define these constants in the environment file
in EC2 instances, as credentials are automatically handled by the IAM role inside of AWS.

// the AWS access key and secret. This is optional if you've configured an instance with an IAM role
// http://docs.aws.amazon.com/aws-sdk-php/guide/latest/credentials.html#caching-iam-role-credentials
define('AWS_ACCESS_KEY', '<access key here>');
define('AWS_ACCESS_SECRET', '<access secret here>');
define('AWS_SECRET_KEY', '<access secret here>');

## Garbage collecting sessions

Inactive sessions are garbage collected by `GarbageCollectSessionCronTask` if [silverstripe-crontask](https://github.com/silverstripe-labs/silverstripe-crontask)
is setup on your instance. The time when a session should be collected after inactivity can be changed by setting
is setup on your instance. The time when a session should be collected after inactivity can be changed by setting
`Session::$timeout`.

For example, in your application's config YAML file, this sets a 20 minute session timeout:
Expand Down

0 comments on commit b154256

Please sign in to comment.