Fix race condition in herd client

replace the temporary cache->set call with a randomised expiration. 
The temp cache->set call could create a situation under high load where an item will never expire.