Libramarian
Adventurer
Nitpick: it isn't actually "memorizing" and "forgetting" so much as it is pre-casting spells so you can release them quickly in combat; think of it less like "I suddenly don't know how to cast fireball anymore..." and more like carrying around a pistol with 3 bullets, a grenade launcher with 2 grenades, and a rocket launcher with 1 rocket--you know how to fire all of them, but you can't fire the rocket launcher twice until you get some more ammo.
This is made more clear (and more flavorful) in the original Dying Earth series, where the setting is post-apocalyptic, spells are complicated almost-intelligent constructs that want to be cast, anyone with the willpower to control them can prepare spells, and someone who can hold 6 spells in their head at one time is a very impressive spellcaster.
When I hear memorization I think working memory, not long-term memory. So you know a spell like you know somebody's phone number you've just heard, until you're momentarily distracted, and then you forget it.
I thought for a while that Jack Vance must have read "The Magic Number Seven, Plus or Minus Two" (famous '50s psychology paper arguing that we have the capacity to hold 7+/-2 concepts in our working memory at once), but I looked up the dates and found the Dying Earth was actually published earlier!