   getId: (identifier, timestamp) ->
     timestamp = @getTimestamp timestamp
     "#{identifier}#{@options.id_mark}#{_pad timestamp, 15}"
+
+  # Generates a random timestamp outside the document period to use for a TTL
+  # index expiry timestamp
+  getExpiry: (timestamp) ->
+    day = 60 * 60 * 24
+    week = day * 7
+    # Generate a random offset between one day and a week
+    offset = Math.random() * (week - day) + day
+    moment.utc(timestamp).add -1 * offset, 'seconds'
 
   ###
   # Record events

    # Set our period timestamp on the document
    updateTimestamp = {}
    updateTimestamp[@timestamp] = timestamp

    # Create or update the document
    @findAndModify

      all: 'all'
      events: 'events'
      timestamp: 'timestamp'
      expires: 'expires'

    # Initialize the document superclass
    super collection, mapping
