Allows to save objects to localstorage with expiration period