Close inactive sessions

Can we calculate session timeout in the constructor? Calculating in every isActive() is seem costly