I have a URL rewriter running on sites which essentially maps pretty URLs to a single Visualforce page which takes a standard ID parameter.

If I enable caching for the page with cache='true' in the page tag, will the system cache versions for each URL used, or will it just cache whatever record happens to be accessed first?


All caching is based on the pretty URL (what you see in the browser). Query strings count as part of the cache key, so these URLs would be different values:


Pages that are URL rewritten as eligible for caching. If you don't specify a cache attribute, it defaults to 10 mins (for public sites).


Based on this comment, unique parameters in the query string do not go back to cache (which is a good thing). So you shouldn't have a worry there about serving incorrect page results.

I couldn't find any reliable documentation or posts about caching in conjunction with a URLRewriter though. I think you'll have to test it. I would guess that either URL-rewritten pages are ineligible for caching altogether (seems somewhat unlikely) or that they are cached based on the pretty URL rather than the end parameter.

  • Yeah, I'm starting to think that experimentation will be the way forward with this. – Matt Lacey Mar 22 '13 at 4:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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