zalando / tailor

A streaming layout service for front-end microservices
http://www.mosaic9.org
MIT License
1.73k stars 140 forks source link

Stop to reload fixed fragments in different route for application. #331

Open Pragnesh-Er2007 opened 4 years ago

Pragnesh-Er2007 commented 4 years ago

We have used tailor for serving multiple fragments and among them some fragments are used in all the page like header, footer, navigation etc. Now I want to stop to reload this header, footer and navigation fragments in different application route. Do we have any functionality to stop reload this fixed fragments.

StyleT commented 4 years ago

Hi! I believe you can look at the https://github.com/namecheap/ilc It allows you to do this & it's based on Tailor.

Pragnesh-Er2007 commented 4 years ago

It is all about new framework and for now it is not possible to integrate ilc in our existing architecture. So if Tailor does not have any option to do this so we need to implement client caching. Please suggest me if we have any option in tailor to prevent this behavior.

vigneshshanmugam commented 4 years ago

Can you get in to more specific details? Do you want to server cached assets for the fragments on reload or you don't want the request itself to be fired for those fragments?

Both of that scenarios are not baked in to tailor, so you might want to extend the requestFragment function to do caching on either tailor level or you can add support for client side caching.

Pragnesh-Er2007 commented 4 years ago

Actually I want to stop to request itself from browser to server as well. Can you please some idea how we can handle client side caching using requestFragment.