Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] jetty webserver cache dynamic webpages

As far as i know, jetty cannot do that.
But you can do it with a cache server (like Couchbase), I have done that before.
The request path is:

First time cache is not exists:
client -> http handler ->  read from database and set to cache server(use a callback with arguments) -> response to client.

Second time, cache is exits:
client -> http handler -> cache server -> client.

If the cache with the key is not accessed in a period of time(let's say 10 mins, whatever you want), it will be expired and cleaned by itself.

Maybe generate satic html pages is also a good option.

Sorry if some syntax error exists, because English is not my native language.
------------------ Original ------------------
From:  "Daniel Arend";<arendd@xxxxxxxxxxxxxxxxxx>;
Date:  Thu, Oct 23, 2014 04:39 PM
To:  "jetty-users@xxxxxxxxxxx"<jetty-users@xxxxxxxxxxx>;
Subject:  [jetty-users] jetty webserver cache dynamic webpages

Hey,

I have a jetty webserver in my application and implemented a http handler to
send dynamic html pages to a requesting clients.

Dynamic means, that I do not store the websites on the server to send them to the client.
I create every page dynamiclly with a template API and fill in data from a database.

For a request of a small pages the performance is very well, but if the request ends in
a very big site, the database query is slow and so the generating process and at the end the request takes a lot of time.

Is there a possibility that jetty (version 9) can cache these dynamically created pages, because they never change !?
So that only the first request of a page would be slow and then the next time jetty took the page from the cache!?

Kind Regards,

Daniel
 
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

Back to the top