@@ -0,0 +1,954 @@
+package techcable.minecraft.factionsapi.util;%0A%0Aimport com.google.common.cache.Cache;%0Aimport com.google.common.cache.CacheBuilder;%0Aimport com.google.common.cache.CacheLoader;%0A%0Aimport lombok.*;%0A%0A@Getter%0Apublic class EasyCache%3CK, V%3E %7B%0A    private final Cache%3CK, V%3E backing;%0A    public EasyCache(Loader%3CK, V%3E loader) %7B%0A        backing = CacheBuilder.newBuilder().weakKeys().weakValues().build(new LoaderCacheLoader(loader));%0A    %7D%0A    %0A    public V get(K key) %7B%0A        return backing.getUnchecked(key);%0A    %7D%0A    %0A    public static interface Loader%3CK, V%3E %7B%0A        public V load(K key);%0A    %7D%0A    %0A    @Getter%0A    private static class LoaderCacheLoader%3CK, V%3E extends CacheLoader%3CK, V%3E %7B%0A        %0A        private LoaderCacheLoader(Loader%3CK, V%3E backing) %7B%0A            this.backing = backing;%0A        %7D%0A        private final Loader%3CK, V%3E backing;%0A        %0A        @Override%0A        public V load(K key) %7B%0A            return backing.load(key);%0A        %7D%0A    %7D%0A%7D

Add Easy Cache