Optimize: Try to use cache, evaluate query terms once