One of the more typical ways to determine if a file needs to be recached is by using filemtime() the check it's modification date against a sort of expiration date. The expiration date is typically something that could come from the database.
I'm trying to circumnavigate the database entirely...so I can't check the modified date against a dynamically created date (the settings for this come from the db). I haven't tried this, but it does seem possible that I could set the modified date by hand using a header(). However, I'm not sure if all browsers would deal well with this and perhaps more importantly this is a bad practice.
I could access the modified time (as I would set it in the future) and if it was less than the server time() now then we'd recache it.
The other thing I'm wondering about, perhaps there is a way to access the header('expires') setting via php?
I can't seem to find anything about these...leading me to believe I'm going down the wrong path here...any ideas out there?