Add configrable parameter for cache expiration time. The changes were already done in the previous version, but were lost in merge.