There are actually quite a lot of studies pointing in all directions when it comes to memory and caffeine use. I wouldn't call it a closed case by any standard, although many sites hawk caffeine as a great improver of memory, especially long-term memory.
Some studies showing no effects of long-term caffeine use on memory:
- Hameleers et al. (2000): A large number of adults (1875) ranging in age from 21 to 84 were studied while consuming caffeine over long periods of time. Even after compensation for various medical and sociological factors, no effects on short-term memory were observed. The sheer amount of data gathered is one thing in favor of this study, as outliers would not have influenced the result.
- Herz (1999): A large number of subjects were studied while undergoing certain sessions containing cognitive tasks. No effects on memory were observed from caffeine usage.
- Warburton (1995): Low doses of caffeine were used on subjects over an extended period of time. There were non-negligible mood changes, but no effects on working memory. Note that this study focused in part on caffeine deprivation, rather than giving subjects additional caffeine.
Some studies showing positive effects of long-term caffeine use on memory:
- Angelucci et al. (2002): A group of rats (not humans!) was studied, given caffeine injections at various points during training. They were then given the Morris water maze test. Some of the rats were able to better remember pervious sessions - as the authors put it,
These data provide evidence that caffeine improves memory retention but not memory acquisition, explaining some discrepancies among reports in the literature.
- Beydoun et al. (2014): Caffeine and alcohol use and diet were studied simultaneously in a large group of subjects. The findings were mixed, although some evidence was found supporting the hypothesis that caffeine use can increase overall cognitive function in older adults.
Some studies showing negative effects of long-term caffeine use on memory:
- Han et al. (2007): Subjects were studied over four weeks while using low doses of caffeine. A slight decrease in memory function was observed, caused in part by inhibition of part of the hippocampus.
I haven't shown the same amount of studies in all three categories - neutral, positive, and negative - and that's by design. There is a substantial amount of studies that found no significant effects, and that much more research would be needed to give strong evidence for long-term benefits. There is a decent amount of studies showing some positive long-term benefits, and almost none showing negative long-term benefits.
Therefore, I don't think it's safe to go in any of the three directions. However, it does seem like the effects of long-term caffeine use may be negligible.
Also, be careful to differentiate between long-term effects of caffeine on memory and the effects of caffeine on long-term memory! Studies often cover both, because studying subjects over only a few days won't tell you much about long-term memory (certainly not about acquisition, at least). However, they aren't the same thing.