Allow relationship queries to be cached