use safer access to ViewResults params
Merge pull request #197 from dimagi/cache-fixes

use safer access to ViewResults params