@@ -66,95 +66,17 @@ discouraging sensitive data storage. It also forces strict data size
66
66
limitations. DynamoDB takes care of these concerns by allowing for a safe and
67
67
scalable storage container with a much larger data size limit for session data.
68
68
69
+ Full API documentation of the library can be found on [ RubyDoc.info] [ 1 ] .
70
+
69
71
### Configuration Options
70
72
71
- The following options are available to be set in
73
+ A number of options are available to be set in
72
74
` AWS::SessionStore::DynamoDB::Configuration ` , which is used by the
73
75
` RackMiddleware ` class. These options can be set in the YAML configuration
74
76
file in a Rails application, directly by Ruby code, or environment variables.
75
77
76
- <table >
77
- <tbody >
78
- <tr class =" odd " >
79
- <th align =" left " ><p >Option Name</p ></td >
80
- <th align =" left " ><p >Description</p ></td >
81
- </tr >
82
- <tr class =" even " >
83
- <td ><p >:table_name</p ></td >
84
- <td ><p >The session table name.</p ></td >
85
- </tr >
86
- <tr class =" odd " >
87
- <td ><p >:table_key</p ></td >
88
- <td ><p >The session table hash key name.</p ></td >
89
- </tr >
90
- <tr class =" odd " >
91
- <td ><p >:secret_key</p ></td >
92
- <td ><p >The secret key for HMAC encryption.</p ></td >
93
- </tr >
94
- <tr class =" even " >
95
- <td ><p >:consistent_read</p ></td >
96
- <td ><p >True/false depending on whether a strongly consistent read
97
- is desired.</p></td>
98
- </tr >
99
- <tr class =" odd " >
100
- <td ><p >:read_capacity</p ></td >
101
- <td ><p >The maximum number of reads consumed per second before
102
- DynamoDB returns a ThrottlingException.</p></td>
103
- </tr >
104
- <tr class =" even " >
105
- <td ><p >:write_capacity</p ></td >
106
- <td ><p >The maximum number of writes consumed per second before
107
- DynamoDB returns a ThrottlingException.</p></td>
108
- </tr >
109
- <tr class =" odd " >
110
- <td ><p >:raise_errors</p ></td >
111
- <td ><p >True/false depending on whether all errors should be raised
112
- up the Rack stack. See documentation for details.</p></td>
113
- </tr >
114
- <tr class =" even " >
115
- <td ><p >:dynamo_db_client</p ></td >
116
- <td ><p >The DynamoDB client used to perform DynamoDB calls.</p ></td >
117
- </tr >
118
- <tr class =" even " >
119
- <td ><p >:max_age</p ></td >
120
- <td ><p >Maximum age in seconds from the current time of
121
- a session.</p></td>
122
- </tr >
123
- <tr class =" odd " >
124
- <td ><p >:max_stale</p ></td >
125
- <td ><p >Maximum time in seconds from the current time in which a
126
- session was last updated.</p></td>
127
- </tr >
128
- <tr class =" even " >
129
- <td ><p >:error_handler</p ></td >
130
- <td ><p >Error handling object for raised errors.</p ></td >
131
- </tr >
132
- <tr class =" even " >
133
- <td ><p >:enable_locking</p ></td >
134
- <td ><p >True/false depending on whether a locking strategy should
135
- be implemented for session accesses.</p></td>
136
- </tr >
137
- <tr class =" odd " >
138
- <td ><p >:lock_expiry_time</p ></td >
139
- <td ><p >The time in milleseconds after which the lock
140
- will expire.</p></td>
141
- </tr >
142
- <tr class =" even " >
143
- <td ><p >:lock_retry_delay</p ></td >
144
- <td ><p >The time in milleseconds to wait before
145
- retrying to obtain a lock.</p></td>
146
- </tr >
147
- <tr class =" odd " >
148
- <td ><p >:lock_max_wait_time</p ></td >
149
- <td ><p >Maximum time in seconds a request will wait to obtain
150
- the lock before throwing an exception.</p></td>
151
- </tr >
152
- <tr class =" even " >
153
- <td ><p >:config_file</p ></td >
154
- <td ><p >File path to YAML configuration file</p ></td >
155
- </tr >
156
- </tbody >
157
- </table >
78
+ The full set of options along with defaults can be found in the
79
+ [ Configuration class documentation] [ 2 ] .
158
80
159
81
#### Environment Options
160
82
@@ -171,12 +93,12 @@ The example below would be a valid way to set the session table name:
171
93
172
94
The generator command specified in the installation section will generate two
173
95
files: a migration file, ` db/migration/VERSION_migration_name.rb ` , and a
174
- configuration YAML file, ` config/dynamo_db_session .yml ` .
96
+ configuration YAML file, ` config/sessionstore/dynamodb .yml ` .
175
97
176
98
You can run the command with an argument that will define the name of the
177
99
migration file. Once the YAML file is created, you can uncomment any of the
178
100
lines to set configuration options to your liking. The session store will pull
179
- options from ` config/dynamo_db_session .yml ` by default if the file exists.
101
+ options from ` config/sessionstore/dynamodb .yml ` by default if the file exists.
180
102
If you do not wish to place the configuration YAML file in that location,
181
103
you can also pass in a different file path to pull options from.
182
104
@@ -188,7 +110,7 @@ following examples show how to clear old sessions from your table.
188
110
#### Rails
189
111
190
112
A Rake task for garbage collection is provided for Rails applications.
191
- By default sessions do not expire. See ` config/dynamo_db_session .yml ` to
113
+ By default sessions do not expire. See ` config/sessionstore/dynamodb .yml ` to
192
114
configure the max age or stale period of a session. Once you have configured
193
115
those values you can clear the old sessions with:
194
116
@@ -243,3 +165,6 @@ You can pass in your own error handler for raised exceptions or you can allow
243
165
the default error handler to them for you. See the API documentation
244
166
on the {AWS::SessionStore::DynamoDB::Errors::BaseHandler} class for more
245
167
details.
168
+
169
+ [ 1 ] : http://rubydoc.org/gems/aws-sessionstore-dynamodb/frames
170
+ [ 2 ] : http://rubydoc.org/gems/aws-sessionstore-dynamodb/AWS/SessionStore/DynamoDB/Configuration#initialize-instance_method
0 commit comments