Fix shouldCache perf
    @rev eric.anderson@
    @bug W-2119992@
Merging origin/amcculloch/master-pending/cacheFixJavaProtocol into master