jean-frederic clere wrote:
It would be great to pass server_rec* and apr_pool_t* arguments
to all the methods (except maybe num_slots() and slot_size()).
Some providers may need to report error messages, and to do that
they really need a server_rec*. They may also need to allocate
data from a temporary pool. The most obvious use case is that
r->pool would be passed to a method like get() or put().
I am -1 for passing a server_rec* because I think we should be able to
use the provider (via a wrapper) in something else that httpd.
I think I saw two -1s on this (at least the server_rec* part).
I can live with the provider returning an apr_status_t; that's fine,
but again we have a consistency issue with the socache API, which
does its own logging. I'd like to see that inconsistency resolved
one way or the other.
I'm still definitely a +1 on passing a "temp" pool to most of
the methods, and both a "conf" and a "temp" pool to create().
Otherwise it's really painful for providers which just want to
do a little temporary allocation, for whatever reason, to have
to create their own sub-pools way up at config time and then
never clear them out. Much nicer if, in the typical case,
r->pool can be passed to get(), put(), etc.
Chris.
--
GPG Key ID: 366A375B
GPG Key Fingerprint: 485E 5041 17E1 E2BB C263 E4DE C8E3 FA36 366A 375B