You are here

Property-Cache-Bug in P8 3.5 API

While working with the FileNet API, we recently found a bug that caused us some headache. I document this in our blog to help other out there that might have the same issues.
Every FileNet object in the API has a property cache attached to it. So when getting a property from a FileNet object, the API first checks if this property is already in the cache and performs a RPC to the CE server only if the property is not available. This cache is initially populated with the requested properties when the object is fetched, e.g. by a search query.
If you get a property from an object that is not in this cache, you expect the API to perform a RPC to the server and then add this property to the cache. But instead, the API discards the entire cache and places the property as single element in this cache. From now on, every getProperty call causes the API to perform a RPC to the server. When getting a property A, it is placed as single element in the cache. The next request for property B clears the cache and places property B as single element in the cache. When requesting property A again, the API needs to run another RPC to the server, and so on.
The only way to cope with this is to initially fetch all properties your application requires. Otherwise, your application will still work but suffer from a massive decrease of performance.

Tags: