Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] ProxyServlet send cached file contents

Sorry I couldn't figure this out by searching.

I'm using ProxyServlet to front a locally hosted javascript
compilation service that, when executed, compiles a bunch of *.js
files together.  It then returns the result back to the caller of the
ProxyServlet.  This compiler service is pretty slow.

I'd like to cache the result of that output to a file 'app.cached.js'
and serve the file content directly rather than callout to the
compiler service if the cached file exists.  Using a separate task,
I'll watch for changes in the js/ filesystem tree and delete the
app.cached.js file to ultimately trigger recompilation.

What in ProxyServlet do I override to pipe the file stream to the
response?  Should I be using AsyncMiddleManServlet instead?

Thank you,
Paul


Back to the top