caching based on passage of time since calculation and file modification