It is a simple cache system which should roll through updates in the $conf["cache"]["directory"] directory based on what URL is accessed (the file names are a SHA1 hash of the requested URI (bit after the site URL)) and is only cached for however many seconds $conf["cache"]["time"] is set to (default 86400); so basically its a hash of all requested URLs such as:
ubb.sitemap.php?type=6&se=1 (sitemap search engine index page)
ubb.sitemap.php?type=7 (Forum Listing)
ubb.sitemap.php?type=10 (UBB.threads Events [Mod])
ubb.sitemap.php?type=8 (UBB.threads Pages [Mod])
ubb.sitemap.php?type=9 (UBB.threads Reviews [Mod])
Then all of your offset pages based on how large a chunk $conf["offset"]["increment"] defines (default 10k, specified maximum of 50k):
ubb.sitemap.php?type=1&se=1&offset=0
If you see outdated cached files it's likely human error (someone attempting to craft custom URLs into the system).
As for the version, it is the $build and $release variables in the script, and should be viewable on all pages (including the debug page (ubb.sitemap.php?debug=1) if your version supports it) when you view the source (ie "view source" and not what is displayed to the browser (it's listed in a comment on the source)
In a nuttshell, the generated system urls should get auto updated, manually crafted URLs will only be updated when they're accessed again; nothing is auto purged (as an expected repository of data should contain the previous offset pages worth of data which should be auto updated)