Re: making cache manager presence/registration optional

From: Gonzalo Arana <gonzalo.arana@dont-contact.us>
Date: Mon, 29 May 2006 10:35:12 -0300

Hi,

I believe there is a little problem with this. If store digest is not
enabled. I get:
store_digest.cc: In function `void
   storeDigestRegisterWithCacheManager(CacheManager&)':
store_digest.cc:135: error: `registerAction' undeclared (first use this
   function)
store_digest.cc:135: error: (Each undeclared identifier is reported only once
   for each function it appears in.)

Attached is my proposal fix for this.

Regards,

On 5/28/06, Robert Collins <robertc@robertcollins.net> wrote:
> I hadn't heard anything back, so I've committed what I think is a
> tasteful implementation of the second option. This has allowed removing
> the stub_cache_manager.cc test suite file, as well as making a bunch of
> modules' init simpler.
>
> Cheers,
> Rob
>
> On Sun, 2006-05-28 at 00:18 +1000, Robert Collins wrote:
> > I'd like to make the cachemgrRegister calls in various of our fooInit()
> > calls not require dragging in the whole squid to the binary, this is
> > part of the blow-out on linked in objects for squid.
> >
> > Secondly, I'd like to remove the idea of the cachemanager being a global
> > object and make it be explicitly passed in when it exists.
> >
> > We discussed this somewhat on irc.
> >
> > Some possibilities:
> >
> > Assuming we have a CacheManager class with 'register' and 'unregister'
> > virtual methods, we could:
> >
> > * add that as a parameter to the Init calls where this is desirable.
> > * Have a separate call from Init in modules which asks the module to
> > register all its menu items with a supplied CacheManager.
> >
> > I prefer the second option, as it makes the behaviour of init more
> > occupied with 'what is required to use a module' rather than 'do
> > everything that /squid/ needs done before running that is related to
> > this module.' Henrik is concerned that this will increase the
> > maintenance cost of main(), which is possibly true, but I think we can
> > address that in future if needed, i.e. by a registry of the modules with
> > a few functions like 'init', 'registerWithCacheManger' etc.
> >
> > Thoughts?
> >
> > Rob
> --
> GPG key available at: <http://www.robertcollins.net/keys.txt>.
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.2 (GNU/Linux)
>
> iD8DBQBEej3JM4BfeEKYx2ERAoPWAJ4lSy5Rff8itOhm5WfyLcs06CA63ACgluZb
> OcntB2Y7OpvtYHxqh/MxQPk=
> =XJhV
> -----END PGP SIGNATURE-----
>
>
>

-- 
Gonzalo A. Arana

Received on Mon May 29 2006 - 07:35:13 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Jun 01 2006 - 12:00:04 MDT