An authority factory that caches all objects created by an other factory. All createFoo(String) methods first looks if a previously created object exists for the given code.
If such an object exists, it is returned. Otherwise, the object creation is delegated to the
authority factory specified at creation time, and the
result is cached in this buffered factory.

Objects are cached by strong references, up to the amount of objects specified at construction
time. If a greater amount of objects are cached, the oldest ones will be retained through a
weak reference instead of a strong one. This means that this buffered
factory will continue to returns them as long as they are in use somewhere else in the Java
virtual machine, but will be discarted (and recreated on the fly if needed) otherwise.

BufferedAuthorityFactory

Constructs an instance wrapping the specified factory. The maxStrongReferences
argument specify the maximum number of objects to keep by strong reference. If a greater
amount of objects are created, then the strong references for the oldest ones are replaced by
weak references.

type - The type of objects to look for. Should be a GeoAPI interface like GeographicCRS.class, but this method accepts also implementation class. If the type is
unknown, use IdentifiedObject.class. A more accurate type may help to speed up
the search, since it reduces the amount of tables to scan in some implementations like
the factories backed by EPSG database.