scripts for heads and entities caching