Yes, magpies appear to have good memories. The best evidence covers two things: where they hide food and which people they remember. The studies are few and mostly done on Eurasian magpies, so the picture is clear in some places and thin in others.
How magpies remember food
Magpies are short-term hoarders. They hide food in several places and usually retrieve it within hours or days. In a lab study, Eurasian magpies hid dyed egg pellets in a tray of wood shavings. They were tested the same day or the next day, and the color they searched for depended on how much time had passed. They learned to search for the pellets and ignore decoy beads. The researchers concluded that magpies can track what they hid, where, and when, even when the items differ only in color.
Black-billed magpies in North America also hoard food, often making several false caches before a real one. They relocate caches by sight and smell, and cache robbing is common, so a stash is not always safe.
Remembering people
Memory also seems to help magpies keep track of people. In a 2011 field study, researchers from Seoul National University tested breeding Eurasian magpies. Every bird tested attacked people who had climbed to the nest, while people who had not climbed drew no such response. The authors suspected that the birds learn faces visually over time, and they noted that frequent contact with people in towns may help.
What the studies do not show
Several gaps remain. The studies available do not show how long a magpie keeps a memory of a person. The lab food test covered only the same day and the next day, so it says little about longer periods. The studies are few, and most used Eurasian magpies, so applying them to American species is an inference.
Memory is also not the same as general intelligence. A magpie that reliably finds its stash is not necessarily better at other problems.
What this means if magpies visit your yard
If magpies visit your yard, the research suggests they may learn where food appears and may remember people who come close to their nests. Those are inferences from lab and nesting studies, not tests in gardens.