|
When you combine and minify the files the first time, you know exactly where they are, right? So at that moment, you'd have to save the list of file names along with the date and time of caching.
On every request, you could check for each file if it has been changed since the last time it was cached. If it was, then you'd need to invaliate the cache and recombine an minify the set. If no file has been changed, then just serve the set from the cache.
So I don't think you'd need to use a timer (it's only needed to refresh the cache when there's an actual request), and medium trust should not be an issue.
The only issue would seem to be the extra effort required to scan for file changes on every request. I'm not sure how much of a negative impact that would have on performance. But with a setting like version="auto" developers can weight the benefits for
themselves.
Do you want me to try prototyping this in a fork so you can test it?
|