Implemented infrostucture for cache clean up when full