Cache issues in localStorage