Skip to content
It's Vapor Week! Celebrating 10 Years of Vapor Read more

Instance Method

insert(_:on:replace:)

func insert(_ document: LeafAST, on loop: any EventLoop, replace: Bool = false) -> EventLoopFuture<LeafAST>

Parameters

document

The LeafAST to store

loop

EventLoop to return futures on

replace

If a document with the same name is already cached, whether to replace or not.

Return Value

The document provided as an identity return