code: void cache(ManagedObject managedObject) {
          // Make a local reference to cachedManagedObjects in case it is changing, there is a risk that 
          // the same slot in cachedMangedObjects will be used twice, in that case the Object is not 
          // cached and will be read again when referenced.
          java.lang.ref.SoftReference[] localCachedManagedObjects = cachedManagedObjects;
          int localICache = iCache++;
          if (localICache >= localCachedManagedObjects.length) {
              iCache = 0;
              localICache = 0;
          }
  
          localCachedManagedObjects[localICache] = new java.lang.ref.SoftReference(managedObject);
          managedObject.objectStoreCacheIndex = localICache;
      }
docs: TODO whole ObjectManager, by putting it in ObjectManagerstate so that all stores can use it.