Loading the Ambient Data Framework (ADF) and executing all cartridges for every request can be an expensive operation. I noticed in the docs that is possible to exclude certain paths from using the filter in cd_ambient_conf.xml, but what I am looking for is a more fine grained approach, being able to control which cartridges are executed for certain paths.

Obviously if I am developing my own custom cartridges, I can build this into the cartridge logic itself, but I was wondering if it is possible to easily set up for the standard cartridges.

1 Answer 1


The only possibility I can think of is to build a single cartridge that in turn loads the rest of the cartridges based on the URL.

You could make it as hardcoded or configurable as you'd want. The only immediate loss of functionality I can think of is the automatic dependency management -- so you'd need to decide if you want to re-implement that or just have a fixed order.

Still, it doesn't seem that difficult to create a cartridge that does this. It would then be the only cartridge configured in ADF.

That said, I would only do this if it's really a big deal. Most cartridges are supposed to be fairly light-weight, so I'm not sure it's worth the added maintenance overhead.

  • The scenario I am looking at is creating a context service based on the ADF, which basically exposes all the contextual information discovered by the ADF so that other systems can use it. Requests to this service might have a specific goal, rather than just "tell me everything you know about this context" for example device capability, or GEO location, hence the need to be selective in what we process
    – Will Price
    Feb 5, 2015 at 10:55
  • But like you say, if the standard cartridges are lightweight, we will just go with all in one, and make sure any custom cartridges we develop are configurable in terms of URL patterns
    – Will Price
    Feb 5, 2015 at 10:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.