Simplified return expression in the case we're not in a transaction and we're writing to cache