valueRef

Wraps a function so that it acts like a simple value. The function is called each time the value is used.

valueRef(ref) → returns any

This function requires Lucee 6.1.0.15 and up.  Not supported on Adobe ColdFusion, etc.

Argument Reference

ref function
Required

The function that returns the value.

Examples
Sample code invoking the valueRef function

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub