Use `lifetime` option of the frontend cache

See #1886 — this one is the corrected PR and targeted at 1.3.0 branch