Use `lifetime` option of the frontend cache

Close #1886
Merge pull request #1973 from sjinks/issue-1886

Use `lifetime` option of the frontend cache