I have an old blind Thamnophis that is like that. I'm the only one he'll let handle him normally. When he was going blind I had to work with him for months to teach him a new way of eating (simple association of a touch on the neck with food).
There's what people would call memory ie; something happens and you can recall it at will, then there's basic Hebbian principle. That's the more simple kind of 'memory' that is the association between two things that aren't naturally associated ie; you touch a flatworm then give it an electric shock it will eventually begin to run the second you touch it with or without a shock. There were a lot of studies done on a man whose hippocampus was completely ablated called Patient H.M. Really interesting case study if you're interested in memory/intelligence.
I feel like many snakes rely more on the second type of memory... The way mine will act if something goes out of their field of vision, I'm pretty sure they have no object permanence. I think my box turtle is much smarter. She actually will seem to look for certain people if they don't show up, so I think she can actually recall things like who her favorite people are.