Fix cookie issues in cache backends