Improve cache validity checks for speed
Get ready for client side compilation