Pull out localStorage getting and setting to cache
Change the order of args in set method