Add some caching capability into AST layer.