add AST cache to the find_by method