Re: HTTP Caching in OFBiz

2019-12-04 Thread Michael Brohl

Hi Chinmay,

thanks for your input!

Just a brief thought: we have an Apache Webserver in front of every 
productive system, connected with the integrated OFBiz Tomcat through ajp.


This allows fine grained configuration for the rendering of static 
resources, caches, compression, request redirects etc.. This might not 
cover all of your points but should be in mind.


Best regards,

Michael


Am 04.12.19 um 13:09 schrieb Chinmay Patidar:

Hi All,

I wanted to bring attention to the handling of HTTP caching in OFBiz. We
can segregate three different areas(possibly more) which involve the cache.
These are listed below:

1. Cache Web resources in CMS.
2. View Rendering.
3. Request Redirects.

Furthermore, details are listed down below which includes the current
implementation, possible improvements, and other related information.

*Cache Web resources in CMS*
In CMS Events, cache headers are set as no-cache. This prevents the
browsers to cache various web resources which are rendered using CMS. In my
opinion, here is a scope of improvement needed. Possibly using the mimeType
or by any other method, the system must be configured to cache the
resources.

*View Rendering*
In the current system, a view can be configured so that it can't be cached.
Also, in the absence of this configuration, the system is not setting any
cache headers. It's up to the browser to handle it.

*Request Redirects*
Currently, there is no way to configure the cache of the requests being
redirected. I am not sure whether this is the desired behavior. On
research, I have found that browsers do cache such requests as well. But
need more inputs on this.

Summarizing the above, we can conclude that the current system is lacking
adequate support for handling the cache headers. In existing
implementation, few areas can be configured only to set no-cache. There is
no mechanism to set the cache on them. The best practices regarding setting
the cache headers can be determined and implemented.

Also, I would like to have your thoughts on the appropriate ways of caching
the request redirects.

Kind Regards,
Chinmay Patidar





smime.p7s
Description: S/MIME Cryptographic Signature


HTTP Caching in OFBiz

2019-12-04 Thread Chinmay Patidar
Hi All,

I wanted to bring attention to the handling of HTTP caching in OFBiz. We
can segregate three different areas(possibly more) which involve the cache.
These are listed below:

   1. Cache Web resources in CMS.
   2. View Rendering.
   3. Request Redirects.

Furthermore, details are listed down below which includes the current
implementation, possible improvements, and other related information.

*Cache Web resources in CMS*
In CMS Events, cache headers are set as no-cache. This prevents the
browsers to cache various web resources which are rendered using CMS. In my
opinion, here is a scope of improvement needed. Possibly using the mimeType
or by any other method, the system must be configured to cache the
resources.

*View Rendering*
In the current system, a view can be configured so that it can't be cached.
Also, in the absence of this configuration, the system is not setting any
cache headers. It's up to the browser to handle it.

*Request Redirects*
Currently, there is no way to configure the cache of the requests being
redirected. I am not sure whether this is the desired behavior. On
research, I have found that browsers do cache such requests as well. But
need more inputs on this.

Summarizing the above, we can conclude that the current system is lacking
adequate support for handling the cache headers. In existing
implementation, few areas can be configured only to set no-cache. There is
no mechanism to set the cache on them. The best practices regarding setting
the cache headers can be determined and implemented.

Also, I would like to have your thoughts on the appropriate ways of caching
the request redirects.

Kind Regards,
Chinmay Patidar