Add option to call Function to calculate Event Cache Timeout for dynamic timeout calculations

Description

Clients have requested the ability to set a specific timeout for Event Caching... for example midnight... currently we cannot do that.
Lucee for one, does not allow us to use a UDF or Closure or even a variable in the function meta data, only a constant value. So we have to manually guess a timeout, 120 or 500 or something, or make it 1440 and then manually clear the caches with a scheduled task or something.

I propose we use metadata in the function to name the DSL of the Model, and metadata to name the method to call on the Model to calculate this timeout value.

If both of these metadata values are present, this would call
`wirebox.getInstance( "apiUtils@api" ).getMinutesUntilMidnight()`
and override the metadata for the timeout.

Pull request is attached. -
I am not sold on the names, and maybe there is a more stylish way to do it ( a shorthand maybe so we can use one variable ).

Assignee

Luis Majano

Reporter

Gavin Pickin

Labels

None

Priority

Major
Configure