Properly implement filter cache