diff --git a/lib/mongo/collection.rb b/lib/mongo/collection.rb index a7ee5b0..e17b177 100644 --- a/lib/mongo/collection.rb +++ b/lib/mongo/collection.rb @@ -450,7 +450,7 @@ module Mongo generate_indexes(valid, name, opts) if valid.any? # Reset the cache here in case there are any errors inserting. Best to be safe. - name.each {|n| @cache[n] = now + @cache_time} + @cache[name] = now + @cache_time name end