Added expreimental database caching for activities.