@Override
    public Proto loadFrom(File file, Proto importer) throws Exception
    {
        String key = file.getCanonicalPath();
        Proto proto = loadedProtos.get(key);
        if (proto == null)
            loadedProtos.put(key, proto = super.loadFrom(file, null));

        return proto;
    }
A proto loader that caches the protos for re-use.

@author David Yu
@created Dec 4, 2011
protostuff-compiler/src/main/java/io/protostuff/compiler/CachingProtoLoader.java