Sounds good. What would be the best way of evaluating the result so I can
cache it?

On Wed, Mar 25, 2020 at 4:03 PM Olaf Kock <tom...@olafkock.de> wrote:

>
> On 25.03.20 14:51, Jonathan Yom-Tov wrote:
> > I think I phrased my question incorrectly. What I want to do is to cache
> > the HTML resulting from the JSPs evaluation so I can serve the cached
> > result. The reason is that I'm working on an application which makes a
> lot
> > of requests per page. This makes the page very slow. What I want to do is
> > to serve some of the requests which build the page out of a cache.
> > Rewriting the offending endpoints would be a very lengthy process. There
> > are a lot of them and they're part of a legacy project which is very hard
> > to get into.
> >
> > So is pre-evaluating the JSPs the correct strategy or is there a
> better way?
>
>
> well, with that, you could either request the JSP yourself and cache the
> result. To do this transparently, you could implement a ServletFilter
> that caches the result if it senses a cacheable request and (on
> subsequent requests) transparently serves the value from cache as long
> as the criteria ("should re-evaluate") holds.
>
> Bonus points for taking care of concurrent requests during
> re-evaluation, and pause them during the time a re-evaluation is done in
> a different request.
>
> Olaf
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-- 
[image: SysAid Technologies]
<http://www.sysaid.com/?utm_source=signature&utm_medium=email&utm_campaign=sysaid-logo>
Jonathan Yom-Tov
Senior Architect
jonathan.yom...@sysaid.com
Phone (IL): +972 (3) 533-3675 Ext. 932
[image: SysAid Technologies]
<https://www.sysaid.com/?utm_source=signature&utm_medium=email&utm_campaign=sysaid-logo-icon>
  [image: SysAid on Facebook] <https://www.facebook.com/SysAidIT>   [image:
SysAid on Twitter] <https://twitter.com/sysaid>   [image: SysAid on
Linked-in] <https://www.linkedin.com/company/sysaid-technologies-ltd>   [image:
SysAid on YouTube] <https://www.youtube.com/user/SysAidIT>   [image: SysAid
on Instagram] <https://www.instagram.com/sysaid_technologies/>
[image: Banner] <https://www.sysaid.com/sig-link>

Reply via email to