Module: Aws::SessionStore::DynamoDB::GarbageCollection
- Defined in:
- lib/aws/session_store/dynamo_db/garbage_collection.rb
Overview
Collects and deletes unwanted sessions based on their creation and update dates.
Class Method Summary collapse
-
.collect_garbage(options = {}) ⇒ Object
Scans DynamoDB session table to find sessions that match the max age and max stale period requirements.
Class Method Details
.collect_garbage(options = {}) ⇒ Object
Scans DynamoDB session table to find sessions that match the max age and max stale period requirements. it then deletes all of the found sessions.
12 13 14 15 16 |
# File 'lib/aws/session_store/dynamo_db/garbage_collection.rb', line 12 def collect_garbage( = {}) config = load_config() last_key = eliminate_unwanted_sessions(config) last_key = eliminate_unwanted_sessions(config, last_key) until last_key.empty? end |