           if processedCache[bucketIndex].ids.length < 3
             newIds = item.ids.slice 0, 3 - processedCache[bucketIndex].ids.length
             processedCache[bucketIndex].ids = processedCache[bucketIndex].ids.concat newIds
-          processedCache[bucketIndex].count += item.count
-          processedCache[bucketIndex].createdAt[1] = item.createdAt.last
+          processedCache[bucketIndex].count        += item.count
+          processedCache[bucketIndex].createdAt[1]  = item.createdAt.last
       else
         processedCache.push item
 

          while overview.length >= lengthPerCache
            overview2d.push overview.splice 0,lengthPerCache

          ###
          # TEST - better not to delete this
          # logs item dates in batches

          for ov,i in overview2d
            console.log "batch #{i}:\n"
            for it in ov
              console.log it.createdAt[0]
          ###

          @createCache overview2d, =>
            @emit "CachingFinished"


    @one selector, defaultOptions, (err, cache)-> kallback err, cache, callback

  @containsTimestamp = (timestamp, callback)->

    date     = new Date timestamp
    selector = to : { $gte : date }

    @one selector, defaultOptions, (err, cache)-> kallback err, cache, callback

  @init = (from, to)->

