gdDocumentation0.8.0

API reference

GDMemoizedCallable

Wrapper remembering a function's arguments and results in an LRU cache.

Methods

setup

setup(fn: Callable, limit: int = 128) -> void

---------------- Memoization ----------------

Parameters

NameTypeDefaultDescription
fnCallableRequiredCallable to invoke; supplied arguments follow the API's callback contract.
limitint128Maximum number of entries retained in the cache.

Return value

void

No value is returned.

Errors

This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.

call_with

call_with(args: Array) -> Variant

Invoke the retained Callable with arguments and compare native Variant values.

Parameters

NameTypeDefaultDescription
argsArrayRequiredArguments in call or parameter-binding order.

Return value

Variant

Errors

This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.