Polyfill-service: Can I use the cache in self-hosting environment?

Created on 23 Nov 2020  ยท  5Comments  ยท  Source: Financial-Times/polyfill-service

What


Can I use the cache in self-hosting environment?

Details


The server uses the UserAgent and Request URL QueryString to generate a key that can identify the request and stores the response data along with the key, and the response time is greatly reduced when the server responds with the stored data.

I think the implementation for this cache feature is very simple, but I haven't been able to find any implemented function.
Can i use the cache in the self-hosting environment?

service

Most helpful comment

Happy to have it added and activated via an environment variable ๐Ÿ‘

All 5 comments

Thanks for the question @stegano.

The cache is implemented in Fastly VCL, if you use Fastly then you can apply our Fastly VCL and benefit from the caching system we have built.

If you are not using Fastly then you will need to implement a caching system yourself.

Hi @JakeChampion,
Thanks for your answer ๐Ÿ˜€
I think it would be better if the polyfill-service itself provided caching. Is there any reason to use a 3rd party platform instead of implementing the cache in polyfill-service? ๐Ÿค”

It would not be worthwhile for this service to implement it's own caching since we get a huge benefit from using Fastly's. Fastly is heavily optimised for caching assets across their global content delivery network and is offering their services for free to the public polyfill service on https://polyfill.io

Thank you for your quick answer. ๐Ÿ˜€

In my case, I cannot utilize CDN, so I have to implement and use the caching function on the server.
May I create a the cache feature and PR to this repository for use in situations like my case?

If it does not match the direction of this project, I will create a separate repository and use it.
Thanks for making a good library. ๐Ÿ˜

Happy to have it added and activated via an environment variable ๐Ÿ‘

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dcherman picture dcherman  ยท  7Comments

romainmenke picture romainmenke  ยท  5Comments

EECOLOR picture EECOLOR  ยท  3Comments

0x6a68 picture 0x6a68  ยท  7Comments

motss picture motss  ยท  4Comments