fix classpath setup for cache
rebuild in cached factory