Fix for Unitary cache strategy support


This patch fixes the population phase of the cache to support
unitary strategy.
It also prevents a possible divide-by-zero error.

Change-Id: I4ab18041f8e908bd60eb581663fe34fbb01c4991
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
commita7bc67e54c5dfc06893fdf87bf4565b8d4429f72
parentf52d84f4c750dfdaba8f4f0c241994b7364ec5fc
authorPaolo Angelelli <paolo.angelelli@qt.io>
committerPaolo Angelelli <paolo.angelelli@qt.io>
commit timeThu, 24 Nov 2016 10:21:01 +0000