Computed Properties
Last updated
Was this helpful?
Last updated
Was this helpful?
Computed Properties are dynamic properties that are cached per component rendering.
Computed Properties are similar to with some key differences:
They are declared as functions within your component with a computed attribute added.
They are cached.
They can return any CFML data type, not just values that can be parsed by JavaScript like .
You can define Computed Properties on your components as functions with the computed attribute added.
You can access Computed Properties in your component template using propertyName().
Computed Properties cache their results for the lifetime of the request. It will only execute once if you reference your Computed Property three times in your component template or from within a component action.
You can prevent caching on a computed property by passing a false argument when invoking it.
You can also access Computed Properties from within your .