refactor thumb cache & generation to reduce front-end load