Its not possible to tell from these high level traces what is causing the cache miss on your second request. There are many possibilities but the most likely could be that you are requesting stuff from the httpRequest:/xxxx resources - which are in the superstack and due to variance at the http level its making the comparison of the spacial scope not equal.
The best tool to use for these cases is to look at the detail trace request, click on the highest res:/test/getData... and choose "Compare Caching". Now go to another root request and find the same inner request for res:/test/getData and select "Compare Caching" again - and now you will see a side-by-side comparison of the cache determination for the two resources.
If a cache hit is possible all the relevant fields must be equivalent.
If you can't determine this yourself then please send us dumps of the traces and we'll be able to find the cause.