Fórum

Set barebone.js and everything.js in cache (LR 6.1.1)

thumbnail
Alexandre Lefèvre, modificado 9 Anos atrás.

Set barebone.js and everything.js in cache (LR 6.1.1)

Junior Member Postagens: 25 Data de Entrada: 27/05/14 Postagens Recentes
Hi all,

I'm currently improving the client side performance. I already follow some tutorials about fast load that hugely improve the time to load but I need little bit more. One of my solution should be to set in cache the files barebone.js and everything.js which are load on each page, each time. They are responsible of 75 to 85 % of total weight.


As i read in some place they should be already in cache but in my case they are not. If you know how to force they to be in cache or if you have an idea about my issue your help are welcome.

If you have some advice about clients side performance with Liferay, i take all advice you have.

About my liferay install:
- Liferay 6.1.1
- Tomcat 7.0.27
- MySQL 5.6

Thanks for your answer.


[EDIT] : I found a way to solve this. I use apache server caching.
I observe my barebone and everything URL and discover the are on URL (in my case) www.myurl.ext/html/js/barebone.js
So get you get you both file (barebone & everything) using your favorite browser.
After I make something like this with ModJK on my apache :

JkUnmount /html/js/barebone.jsp my_worker
JkUnmount /html/js/everything.jsp my_worker

Now on the docroot folder of your host you just have to create the following path
/path/to/my/docroot/folder/html/js

And finally add the file you download earlier.

Hope this will help somebody
thumbnail
Alexandre Lefèvre, modificado 9 Anos atrás.

RE: Set barebone.js and everything.js in cache (LR 6.1.1)

Junior Member Postagens: 25 Data de Entrada: 27/05/14 Postagens Recentes
No one to help me ?
robin thakur, modificado 9 Anos atrás.

RE: Set barebone.js and everything.js in cache (LR 6.1.1)

Regular Member Postagens: 146 Data de Entrada: 09/01/14 Postagens Recentes
same issue, if u got a answer please post here.

thanks
thumbnail
Alexandre Lefèvre, modificado 9 Anos atrás.

RE: Set barebone.js and everything.js in cache (LR 6.1.1) (Resposta)

Junior Member Postagens: 25 Data de Entrada: 27/05/14 Postagens Recentes
I just saw you answer, look at the main post I found a way to use the apache caching.
thumbnail
David H Nebinger, modificado 9 Anos atrás.

RE: Set barebone.js and everything.js in cache (LR 6.1.1) (Resposta)

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
You can actually do a lot better using something like Varnish. Varnish can handle the caching of the JSP output itself so you don't have to mangle the jk workers and httpd static file handling/building.

The problem with your implementation is that an experienced (or even unexperienced) liferay admin could come in and change the portal-ext.properties file to add/remove JS imports and be left scratching their head wondering why the change didn't take effect, not having any clue that there's this weird rule in the worker properties that is blocking the access path...
thumbnail
Alexandre Lefèvre, modificado 9 Anos atrás.

RE: Set barebone.js and everything.js in cache (LR 6.1.1)

Junior Member Postagens: 25 Data de Entrada: 27/05/14 Postagens Recentes
David,

Thanks for your answer (3rd times today emoticon)

I know this is not a perfect way and you perfectly explain why. Moreover, the way I use is difficult to automate.

I will look Varnish it seems very interesting