Set cache periode only when the app runs with production profile
Refactor resource processing