Merge "Fix external cache and secondary user bugs." into oc-dev