[CLC-1586] Fix awkward cache expiration logic
[CLC-1586] Naming, logic fixes
Merge pull request #1003 from yuhunglin/CLC-1586

[CLC-1586] Fix awkward cache expiration logic