added random, getSize, texunit cache