Page 1 of 1

Repository Folder Caching Question?

Posted: Fri Sep 12, 2014 11:27 am
by Fergal
The Ranorex user guide states that sometimes a repository item cannot be found, because the caching info in its parent folder is incorrect. One way to deal with this is to disable the folder cache.

Are there any advantages to having the folder cache enabled?

Are there any risks associated with disabling the folder cache?

Thanks!

Re: Repository Folder Caching Question?

Posted: Fri Sep 12, 2014 1:32 pm
by krstcs
Folder caching allows Ranorex to assume that the object is still in the same place and take actions on the object more quickly. This makes object identification much faster, but if the object has changed in some way (moved to a new parent, changed identifying attributes, etc.) this can make Ranorex unable to find the element because the cache is pointing to the wrong thing.

The downside of not using caching is that Ranorex will try to find the element (instead of assuming it knows where it is) every time it sees it in the test. This means that, if the element is fairly static, you are wasting time having Ranorex re-find the element. But, if you are having issues with an element that is non-static, this is probably the best way to go.

I would suggest though that you make a separate folder for uncached elements in the repo and keep them separate from the more static, cacheable elements (remember, you can have multiple repo items for the same element as long as they are in different folders or have different repo item names). This will allow caching to work on all of the static elements and make them faster, while allowing Ranorex to find all of the dynamic elements without caching. One thing to remember though is that you will need to make sure the search timeouts on the non-cached items are set high enough so that Ranorex has time to find the elements.

If your elements are using ID attributes, and you use the "#'<id>'" nomenclature, then you probably don't have to worry about it too much because the # (Unique ID) attribute is pretty quick.

Re: Repository Folder Caching Question?

Posted: Fri Sep 12, 2014 1:34 pm
by Fergal
Thanks krstcs, that's exactly the info I needed and I do like the idea of a separate folder for non-cached items.