caching and clean up of models and views