@Override
    public T get() {
        T obj;
        if (iterator.hasNext()) {
            obj = iterator.next();
        } else {
            obj = create();
            cache.addFirst(obj);
        }

        return obj;
    }
Constructs caching object supplier that uses Deque as cache. Deque may be a thread safe implementation.
It will be filled with {@code preallocate} number of objects.

@param cache
@param preallocate
client-v2/src/main/java/com/clickhouse/client/api/internal/CachingObjectsSupplier.java