Quick Fix : Unassigned variable $cacheValue

Removing redundancy and make use of $cacheValue that has been defined
before the if statement.