Add cache control and clean up the predicates implemtation