Learning the same melody in multiple keys and octaves is great for your understanding of fretboard layout. Try and speak or sing the words as you play the notes. It's great for your memorization and also helps you internalize multiple musical elements at once!