Re: [exim] caching of file contents in expansion testing mod…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Matthias Waffenschmidt
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] caching of file contents in expansion testing mode
Hello,

On Wed, Nov 23, 2005 at 02:27:18PM +0000, Philip Hazel wrote:
> > when debugging an expansion problem via -be I discovered the following
> > problem (running version 4.52 on FreeBSD):
> >
> > If you're using a file lookup like
> >
> > ${if eq {${lookup{whatever}nwildlsearch{/some/file}}}{test}{yes}{no}}
> >
> > the file contents are cached and will not be reread if /some/file has
> > been changed (-d always says 'cached open').
> >
> > Is this a feature or a bug? If it is a feature (I don't guess so) it
> > should be documented in the docs.
>
> Exim caches the results of lookups *within the same process*. Since Exim
> processes normally run for a short time, and do just one job (e.g.
> receive a message, deliver a message), this is not a problem. A change
> to the file will be picked up by the next Exim process that reads it.
>
> If you start an Exim -be process and do a lookup, then change the file,
> then re-issue the same lookup within the same Exim process, then yes,
> you'll get the same answer.
>
> Exim could discard its caches after each line when testing with -be, but
> then you couldn't use -be for testing the caching! Exim's test suite
> currently uses this test.


OK, I see this behaviour makes sense. Maybe some hint could be added
to the documentation of the -be option. I guess I'm not the first
person running into this problem.

-- 
Gruss / Best regards   |  LF.net GmbH        |  fon +49 711 90074-411
Matthias Waffenschmidt |  Ruppmannstr. 27    |  fax +49 711 90074-33
mw@???              |  D-70565 Stuttgart  |  http://www.lf.net