【发布时间】:2014-02-14 14:12:12
【问题描述】:
喂,
所以我继承了一个使用 APC 作为缓存机制的 symfony 1.3.8 应用程序。尽管如此,我还是通过使用禁用了缓存
default:
enabled: false
with_layout: false
lifetime: 86400
带有密钥*.symfony.routing.data 的条目仍被保存。
每次我打开指向我使用插件生成的 PDF 文档 $host/$app/erhebung/13398/ausweise.pdf 的链接时,我第二次打开该链接时都会收到错误:
Action "erhebung/13398" does not exist., referer: …
缓存确实 - 在第一次调用之后 - 包含
的序列化值array(2) {
'parse_/erhebung/13398/ausweise.pdf_b0d96fa30dcf0130d6a4b26f14f44bfb' =>
array(3) {
'name' =>
string(7) "default"
'pattern' =>
string(18) "/:module/:action/*"
'parameters' =>
array(3) {
'module' =>
string(8) "erhebung"
'action' =>
string(5) "13398"
'ausweise.pdf' =>
bool(true)
}
}
'generate__4d783133e9aa851733d16cf1d1750ad5_b0d96fa30dcf0130d6a4b26f14f44bfb' =>
string(1) "/"
}
这似乎是错误的路由模式,应该是:
erhebung_ausweise:
url: /erhebung/:id/ausweise.pdf
param: { module: erhebung, action: ausweise }
requirements: { id: \d+ }
代替:
default:
url: /:module/:action/*
当我手动清除 APC 缓存时,我可以再次生成并打开 PDF。
【问题讨论】: