Make sure to specify the uid when creating the user so that it will for sure match up with the uid specified for the cache. I was having permissions problems with the cache dir until I saw that the user that was created had uid 999.
useradd -u 1000 myuser