Daniel Tiefnig wrote:
> One major point I first wondered about, was that my domainlist
> local_domains is expanded to the mysql query each time it is used. It
> would be sufficient - at least or my setup - if a domainlist could cache
> it's own result. (I know, it _does_ if it is sure to expand to the same
> result each time, but I'd like it to cache for DB queries / file lookups
> too.. Maybe a "static" or "once" option for lists could be added as a
> new feature in future?)
... a patch per day keeps the doctor away, so what about two? ;)
http://www.perlgolf.de/exim-4.31-forcecache.patch
This patch allows you to enforce caching on any list, by appending
_forcecache to to list directive.
Example:
hostlist_forcecache testlist = $sender_host_address
test_acl:
warn message = First test
hosts = +testlist
warn message = Second test
hosts = +testlist
testlist will be cached for the second test. USE THIS WITH CAUTION, it
could introduce problems that can be hard to track down.
The patch uses the normal list caching mechanism of exim, so it does NOT
cache the result of an expansion, but the result of the list-test.
Daniel, it would be nice if you can test this. I did not found any
problems, but maybe they occur in strange situations.
The patch is very simple and was made against the latest snapshot, but I
think it will apply to any exim4 release of the last months.
Again: USE WITH CAUTION
Nico