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

com.maxmind.db.NoCache Maven / Gradle / Ivy

There is a newer version: 3.1.1
Show newest version
package com.maxmind.db;

import java.io.IOException;

/**
 * A no-op cache singleton.
 */
public class NoCache implements NodeCache {

    private static final NoCache INSTANCE = new NoCache();

    private NoCache() {
    }

    @Override
    public DecodedValue get(CacheKey key, Loader loader) throws IOException {
        return loader.load(key);
    }

    public static NoCache getInstance() {
        return INSTANCE;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy