This is the simple wrapper to save and restore values using either cookies or localStorage