A simple way to cache numbers using local storage