Sitemap caching

How long are the sitemaps cached? It appears reading through the code that they are written to the file system, but never updated unless the files are deleted.

Am I wrong in that?