Cache to sharedprefs.