Fix getcite() and refine caching