Yep, understand that, but I have an array with about 40 elements (very rough guess) that tests against the user agent string. So instead of having to maintain a list of every conceivable user mobile agent string (there are many) to a user agent group, i’d like to be able to use a preg_match_all and just test for some key words in the string.
My guess would be:
w3tc_add_action('w3tc_pgcache_cache_key', 'modify_page_key');
function modify_page_key($key) {
//if user agent matches any of the elements in the array of mobile-like user agent words, $key .= 'something_special';
}
I will give this a try now, but if you have a better solution, lay it on me! I think this should work though… right?