Empty cache on resize, added comments for ticking and lastScrollY