All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jdash.client.cache.WriteOnlyCache Maven / Gradle / Ivy

The newest version!
package jdash.client.cache;

import jdash.client.request.GDRequest;

import java.util.Optional;

class WriteOnlyCache implements GDCache {

    private final GDCache delegate;

    WriteOnlyCache(GDCache delegate) {
        this.delegate = delegate;
    }

    @Override
    public Optional retrieve(GDRequest request) {
        return Optional.empty();
    }

    @Override
    public void put(GDRequest request, Object cached) {
        delegate.put(request, cached);
    }

    @Override
    public void clear() {
        delegate.clear();
    }
}