如何在我的网络应用程序中配置过滤器

时间:2017-02-27 13:26:18

标签: wildfly undertow

我有正在服务一个index.html和bundle.js文件的服务器(服务器:JBoss的EAP / 7,X供电-通过:暗流/ 1)。我希望关闭我的开发环境的bundle.js文件的缓存,以便我可以更新它而无需清除缓存。

我知道我是通过在web.xml文件中添加过滤器来实现这一点的,但我不知道我应该使用什么样的倾斜类。我怎样才能了解更多信息?

1 个答案:

答案 0 :(得分:0)

我认为在这种情况下您不需要配置过滤器。缓冲区缓存用于缓存JBoss EAP下级子系统中的静态资源。缓冲区缓存的默认大小为10MB。

<subsystem xmlns="urn:jboss:domain:undertow:3.1">
  <buffer-cache name="default"/>
  ....
</subsystem>

我认为您可以使用它并将缓存缓冲区大小更改为零,或者删除缓冲区缓存,即使我还没有验证。

/subsystem=undertow/buffer-cache=default/:write-attribute(name=buffer-size,value=0)
:reload

您可以参考以下文档中的详细信息:

  1. https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html/configuration_guide/configuring_the_web_server_undertow#undertow-configure-buffer-caches
  2. https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html/configuration_guide/reference_material#undertow-attribute-refs
  3. 请注意,您还可以在清除浏览器缓存时参考this

相关问题