Faster filtering with prefix anchor

also added forgotten line to actually cache the results