You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alternatively, you can use the generated YAML configuration file
112
+
`config/dynamo_db_session_store.yml`. YAML configuration may also be specified
113
+
per environment, with environment configuration having precedence. To do this,
114
+
create `config/dynamo_db_session_store/#{Rails.env}.yml` files as needed.
115
+
116
+
For configuration options, see the [Configuration](https://docs.aws.amazon.com/sdk-for-ruby/aws-sessionstore-dynamodb/api/Aws/SessionStore/DynamoDB/Configuration.html) class.
117
+
118
+
#### Rack Configuration
119
+
120
+
DynamoDB session storage is implemented in the [`aws-sessionstore-dynamodb`](https://github.com/aws/aws-sessionstore-dynamodb-ruby)
121
+
gem. The Rack middleware inherits from the [`Rack::Session::Abstract::Persisted`](https://www.rubydoc.info/github/rack/rack/Rack/Session/Abstract/Persisted)
122
+
class, which also includes additional options (such as `:key`) that can be
123
+
passed into the Rails initializer.
124
+
125
+
### Cleaning old sessions
126
+
127
+
By default sessions do not expire. See `config/dynamo_db_session_store.yml` to
128
+
configure the max age or stale period of a session.
129
+
130
+
You can use the DynamoDB [Time to Live (TTL) feature](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/TTL.html)
131
+
on the `expire_at` attribute to automatically delete expired items.
132
+
133
+
Alternatively, a Rake task for garbage collection is provided:
134
+
135
+
```bash
136
+
rake dynamo_db:collect_garbage
137
+
```
138
+
64
139
## Amazon Simple Email Service (SES) as an ActionMailer Delivery Method
65
140
66
141
This gem will automatically register SES as an ActionMailer delivery method. You
@@ -71,9 +146,7 @@ simply need to configure Rails to use it in your environment configuration:
71
146
config.action_mailer.delivery_method =:ses
72
147
```
73
148
74
-
# Other Usage
75
-
76
-
## Manually setting Action Mailer credentials
149
+
### Manually setting credentials
77
150
78
151
If you need to provide different credentials for Action Mailer, you can call
79
152
client-creating actions manually. For example, you can create an initializer
0 commit comments