That depends on 2 things for me
1) it has to be important for me
2) I have to understand it
Example songs.
I remember thousands of songs. I´m a living jukebox when it
comes to song lyrics. I can play songs in my sleep that I haven´t
played for decades.
I sometimes have to learn songs that I don´t like so much, mean
nothing to me, or are too complicated for me. When there are out of my vocal range
I can´t even sing along. Then it takes forever to memorize them + I´m
not motivated enoug to work on learning them.
I was really bad at school because I didn´t care and so I didn´t even
try to memorize anything.