Generating and Using Entry Identifiers in Message Store Providers

When a new folder or message is created in a message store, the message store provider has to assign that object an entry identifier so that client applications can refer to it. This brings up the option of reusing the defunct long-term entry identifiers of deleted objects or not. There is no requirement one way or the other for message store providers, although if it is feasable, it is better if a message store provider always generates new long-term entry identifiers for new objects rather than reusing old ones. It is fine to reuse short-term entry identifiers when the objects they refer to are deleted.

The reason for this is that clients can cache entry identifiers, sometimes for long periods of time. If that happens and the message store provider does reuse entry identifiers, then it is possible for the entry identifier to refer to a different object when the client opens the entry identifier than when it first obtained the entry identifier. If the message store provider does not reuse entry identifiers — or at least uses an entry identifier generation scheme that does not repeat for a very long time — this problem cannot occur.

Similarly, it is good for message store providers to attempt to preserve entry identifiers for folders and messages when they are moved within the message store. If the message store provider can do that, references to objects in the store will not become invalid when the object is moved to a different location within the store.