Hi,

I want to create a data structure and associate it with a request_rec*,
which will be accessed by multiple filters and handlers in our module.

I know I can use the filter->ctx for general data structure storage, but I
actually want something that will be accessed by multiple filters and
handlers without having to rebuild it.  Currently our module
(mod_pagespeed) rebuilds the same context multiple times and this can be a
little more compute-intensive than desired.

Of course I can make my own std::map<request_rec*, MyAwesomeStructure*> and
put the map in my own module config, cleaning up and freeing my structure
when the request_rec's pool is deleted via a hook.

But I wanted to see if there was a more direct place to stash pointers.

I also know I can put strings in request->notes but I need to put a data
structure, not a string.

Is there an easy way to do this?  Or should I use a map?

-Josh

Reply via email to