如何为Angular universal SSR应用程序启用Apache文件缓存

如何为Angular universal SSR应用程序启用Apache文件缓存,angular,apache,caching,server-side-rendering,Angular,Apache,Caching,Server Side Rendering,我正在CentOS中为Angular SSR应用程序设置Apache文件缓存,以减少TTFB,并且登录页将有更快的加载时间 我尝试了以下步骤: 通过在/etc/httpd/conf.modules.d目录的00-cache.conf中添加以下行来启用mod_file_cache.so LoadModule file\u cache\u module modules/mod\u file\u cache.so 在http.conf中启用了MMAPFile MMapFile/var/www/html

我正在CentOS中为Angular SSR应用程序设置Apache文件缓存,以减少TTFB,并且登录页将有更快的加载时间

我尝试了以下步骤:

  • 通过在/etc/httpd/conf.modules.d目录的00-cache.conf中添加以下行来启用mod_file_cache.so

    LoadModule file\u cache\u module modules/mod\u file\u cache.so

  • 在http.conf中启用了MMAPFile

    MMapFile/var/www/html/dist/browser/index.html

  • 重新启动Apache

  • 尝试从浏览器加载站点,但对于所有请求,TTFB仍为2.5秒。理想情况下,第一个请求应该需要一些时间,但后续请求从缓存中应该更快

    我是不是遗漏了什么。是否有其他更好的方法来减少角度SSR应用的TTFB

    短暂性脑缺血发作