Re: [Exim] ${extract} question

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Fred Viles
Datum:  
To: exim-users
Betreff: Re: [Exim] ${extract} question
On 24 May 2004 at 20:16, Kelley Reynolds wrote about
    "[Exim] ${extract} question":


| Are calls to ${extract} cached if called only on a string?

|
| For example:

|
| warn set acl_c1 = foo=1
|      condition = ${extract {foo}{$acl_c1}{$value}{0}}
|      log_message =  This will print out

|
| warn set acl_c1 = foo=0
|      condition = ${extract {foo}{$acl_c1}{$value}{1}}
|      log_message = This will not print out

|
| So I am concluding that the lookup is cached, ...


Sorry if I'm being stupid, but I don't see that your example supports
your conclusion. Rather the opposite, ISTM.

If the result of the first extract was cached and used in the second,
both log messages would print out.

That the first log message was printed but not the second shows that
the first extract yielded '1' while the second yielded '0', as
expected. Whether <string3> is '0' or '1' is irrelevant since the
extract succeeds in both cases, so it is ignored.

- Fred