added lru cache for looking up partitions