Don't add the user id until we actually set the cache.

From #6831.
@mpetrovic It fails testing because the cache_get is using the wrong $cid, concatenation is done here with '+', if it is working it's an edge case.  I get "04" as the cid when logged in as user 4.