Do not cache Web ListItems

In our ASP.NET application we have DropDownLists with standard values from reference data(e.g list of Countries).
And we used Cache to avoid re-loading them from the database. The function was like the following:
            private void LoadItems()
            {
                  ListItem[] cachedItems;
                  cachedItems = GetAppCacheItems();
                  if (cachedItems == null)
                  {
                        //Load the reference data from the database omitted for simplicity
                        SetAppCacheItems(cachedItems);
                  }
                  Items.Clear();
                  Items.AddRange(cachedItems);
            }
 And this method worked for a long time. Unfortunately, some users complained that sometimes combo-boxes showed values, different from what they selected. Delelopers tried to reproduce the problem on the development machines without success.
I’ve wrote Watin test case trying to reproduce the problem, and it helped me to find the cause.
ListItem includes Selected  property and keeping it in a cache effectilely shares the selection between all users. If one user selected AU as country, but other user selected US at the same time, the  first user can see US as his selection.
 
I had to change code to recreate ListItems for each request.
 
It is still a good idea to keep returned from database data as Dataset or other collection in a cache(For example see Peter A. Bromberg’s article VB.Net: Database/xml enabled, self-cacheing, TooltipDropDownList ServerControl orMichael Thomas‘s Custom auto-bound Drop Down List post).
 

I was surprize to find, that Core C# and .NET  by Stephen C. Perry recommends to cache ListItemCollection, which will cause the bug.