Use cache_classes configuration to determine require or load.

Re #47, fix the double subtract issue.