TemplateParser: Improve cache integrity check failure scenario
authorKunal Mehta <legoktm@member.fsf.org>
Tue, 16 May 2017 22:40:08 +0000 (15:40 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Tue, 16 May 2017 22:40:08 +0000 (15:40 -0700)
commit2d64890f3f67e08f98bc0628d769017deea20e6e
tree2a1cd15d780e20c340e532bde72cae1065ab13b2
parent124390e4c7dcfdab0df00ac5c4047a01298bfa25
TemplateParser: Improve cache integrity check failure scenario

Previously, if the cache integrity check failed then it would emit a
warning but then continue to use the code. The integrity check could
genuinely fail if the secret key was changed, if the cache was
truncated, or other edge case scenarios.

Now TemplateParser will recompile if the cache fails the integrity
check, and then update the cache with the newly compiled version.

Bug: T163154
Change-Id: I9a6c8d528f84cfbabf402cfaf6468c162fab1f15
includes/TemplateParser.php