acs::Cache method eval (public)

 <instance of acs::Cache[i]> eval [ -partition_key partition_key ] \
    [ -expires expires ] [ -timeout timeout ] [ -per_request ] key \
    command

Defined in packages/acs-tcl/tcl/acs-cache-procs.tcl

Evaluate the command unless the result was already computed before and cached.

Switches:
-partition_key (optional)
Used for determining the cache name in partitioned caches. The partition key is computed typically automatically depending on the cache type.
-expires (optional)
Lifetime of the cache entry. The entry will be purged automatically when the time is reached. The time is in seconds unless a time unit is specified (e.g., 5m)
-timeout (optional)
Maximum time to wait for the command to complete. The time is in seconds unless a time unit is specified (e.g., 2.5m)
-per_request (optional)
When set, cache the result per request. So far, no attempt is made to flush the result during the lifetime of the request.
Parameters:
key (required)
The cache key
command (required)
The command to be executed when the result is not yet cached.

Testcases:
No testcase defined.
[ show source ]
Show another procedure: