Moved resource cache into a separate module