There's one thing in CacheListStorage that's bothering me: $this->id is kind of like an auto-increment ID, but it lives in the class instance. In the next request, those IDs are back to 0, so getting/setting in the cache will overwrite/conflicts existing entries.
The only + side is the auto-generated ID, but maybe this concept can be brought back to MapStorage?
I like the idea of using unique IDs. The only issue I see is some items having IDs and others not. Perhaps we can store the unique IDs and store the [user-assigned] key along with the value:
I like the idea of using unique IDs. The only issue I see is some items having IDs and others not. Perhaps we can store the unique IDs and store the [user-assigned] key along with the value:
Then we can return numeric indices for unlabelled values and string keys for labelled values (like standard PHP). What do you think?