Property handle cache
In order to optimize access by key the property handle cache can be activated. Usually the property handle cache is deactivated. The property handle cache can be activated by calling changeCache() and passing a buffer count greater than 0. In order to deactivate the cache, changeCache() can be called again passing 0 as buffer count.
When the cache is active instances are saved in the cache and are read from the cache when accessing instances by key value. Reading by index will not access the cache. Hence the cache should be activated for random key access, only.
Using the cache in Write mode will lock all instances buffered in the cache. Updating an instance that is stored in the cache can be stored immediately using the save function. Changing the selection in the cache will store the instance to the cache, only.
In order to store all instances in the cache to database, flushCache() can be called.