Fixed a bug in auth cache