I’d like to create a page rule that caches certain pages, however the problem is that these pages have some dynamic session tracking tags added to the url, eg;
I guess you’re talking about the Ignore Query String cache mode:
Ignore Query String / Simple: Delivers the same resource to everyone independent of the query string (Note: The Ignore Query String setting only applies to static file extensions. This setting will remove the query string when generating the cache key, so that a request for “style.css?something” will be normalised to just “style.css” when serving from the cache.).
It sounds like you want to ignore certain query parameters, but keep others as they are essential. I don’t think this is possible even with a custom cache key.
Is it possible for you to move the sessionid to a hash fragment? As it’s not needed server side, why send it to the server? You have effectively added a cache busting parameter to the URI, and removing it will make life easier.