Remembering lines is the greatest chore for an actor. I find it easier if I memorise the words with the emotions and actions. It would even be better if I have someone feed the dialogue with me and do so with emotions.
.
In all, it amounts to living in the moment. If we live in the moment, we capture the moment of eternity and remember everything.