Cache webpage in server side rendring

Hello,

We have a meteor application with server-side rendering. We have static and dynamic pages but we need to cache static pages only with its HTML/CSS and API data on the server for fast response to users.

For example, When a user accesses a static page, it is initially fetched from the server, and subsequently, it is retrieved from the cache for subsequent visits. In the case of a dynamic page, it is always served directly from the server without utilizing a cached version.

So is there a way to archive the above caching in Meteor JS?

1 Like

@hitsitapara

Do you mean like overriding some URL in webserver config, like Caddy 2 ? Maybe look at different caching options of Caddy server?

something.example.com {
        tls {
                alpn http/1.1
        }
        header /.well-known/* Content-Type application/json
        header /.well-known/* Access-Control-Allow-Origin *
        respond /.well-known/assetlinks.json `some different content at this url here`
        reverse_proxy 192.123.123:3000
}