Skip to content

Instance Method

insert(_:on:replace:)

func insert(_ document: LeafAST, on loop: any EventLoop, replace: Bool) -> 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 (or a failed future if it can’t be inserted)