Issue 7936 by sgl: Adding hook for expire