Domain Access Database prefix I am on D7.x

I have not quite figured out how to solve the table prefix problem that was solved with domain access table prefix in the 6.x branch.

I know that I will need separate caching tables for instance, but I'm not quite sure how to allow the table prefixing when everything is based off the same settings.php file.

Thanks for your help.
I figured this out by making decisions in the settings.php file.  I have a switch statement that gets the url and then sets a table prefix variable and then that determines the db name, the db password and the prefix.  The default is to share everything if something is not found.