Since a few people have been misled because I only mentioned MongoDB in the title: the question is about how to do this in MongoDB, on a property.
I have an an object like this:
{
List<string> MyQueue;
}
Is there a way to clamp the number of entries to a specific number so that when I push new values in, older values may get dropped?