Meditation is known both spiritually and scientifically to increase mental functioning and memory capacity on its own (http://eab.sagepub.com/content/33/4/480.short as a point to start reading on it if you want to know the science). Most spiritual activities will over time increase cognitive function but it's a slow and gradual process to experience long term effects.
Herbally ginko leaves in teas are excellent at expanding your memory retention as well as foods high in omega three such as fish. There is also strong evidence that grapes, berries, walnuts and rosemary expand other cognitive functions (http://www.livestrong.com/article/303040-herbs-foods-for-memory/).
There are ways to aid your memory but no quick fire spells that will instantly make you a walking encyclopedia unfortunately.