[FIX] Smarty caching cross-sessions

Fixes #1691 and fixes #1684