Eidetic memory

An individual with eidetic memory (also known as photographic memory) could clearly recall anything they had ever experienced.

Two of the Doctor's companions had eidetic memory: Zoe Heriot (TV: The Wheel in Space) and Melanie Bush. (TV: Terror of the Vervoids)

Time Lords had a form of eidetic memory, enabling them to recall every detail of even the most insignificant moments in time. (TV: The Eleventh Hour)

Luke Smith had an eidetic memory. He was able to recall the Bane frequency number that Mr Smith had recited earlier. He programmed the Star Poet's communication device with it, using it to destroy the Bane Mother. (TV: Invasion of the Bane)