caching - AEM Dispatcher 缓存规则
问题描述
我想添加一个缓存规则来缓存具有给定 url/路径的多个扩展。
样本:
/rules
/0100
{
/url "/urlpath/*"
/type "allow"
/extension '(json|xml|html|clientlibs|css|gif|ico|js|png|swf|jpe?g|woff2?)'
}
这是有效的吗?
解决方案
您必须遵循指定要缓存的文档的要求:
/rules 属性中的每个项目都包含一个 glob 模式和一个类型:
The glob pattern is used to match the path of the document. The type indicates whether to cache the documents that match the glob pattern. The value can be either allow (to cache the document) or deny (to always render the document).
看起来您正在尝试在缓存部分中使用过滤规则的语法。我认为您需要使用与使用通配符的 URL 和扩展名匹配的 glob 模式,因此您可能需要使用多个规则。
推荐阅读
- django - DJANGO - 模型中的默认过滤器
- reactjs - Material UI:访问子节点
- 零件
- javascript - 在项目中包含 X 射线刮刀时出现 Npm 错误
- reactjs - React Typesscript 消费组件回调
- android - 无法关闭或点击 Admob 应用
- r - 手动创建的公式似乎不起作用……但为什么呢?
- python - Python,如何使嵌套循环在函数中工作?
- php - 此代码是否受 SQL 注入保护?
- javascript - 如何从内部函数调用返回错误?
- php - SQLSTATE [23000]:违反完整性约束:1062 键 'users_email_unique' 的重复条目 'rbuckridge@example.com'