Support configurable cache size (Java, Pig)