Subject: | Cache previously converted docs |
if i look at a module doc, i'll probably look at it again soon.
once Apache::Pod converts something, save it to some directory (perhaps turned on by config directive). if the same thing is requested again and the original file has not changed, serve the cached copy.
i don't have time for a patch at the moment (but you'll probably get one from me later), but here's what i think:
file = getpodfile
if cache_file exists and cache_file.mtime > file.mtime
set last_modified header
serve cache_file
return OK
else
convert file
set expires_header to some_value # configureable?
serve file
cache_file = file
return OK
if you like that, then from there you can add a URI switch to refresh
the cache even if the file has not changed.
other ideas:
+ rather than cache things, just use the expires header and let
the browser figure it out
+ if you cache them, you have them around for other uses since they
are already converted (as long as your other apps know the directory)