package plugin.google.maps;

import android.util.LruCache;

import java.util.HashSet;

public class ObjectCache {
  public final HashSet<String> keys = new HashSet<String>();
  private LruCache<String, Object> objects = new LruCache<String, Object>(10000);

  public boolean containsKey(String key) {
    return keys.contains(key);
  }

  public void put(String key, Object object) {
    keys.add(key);
    objects.put(key, object);
  }

  public Object remove(String key) {
    keys.remove(key);
    return objects.remove(key);
  }

  public Object get(String key) {
    return objects.get(key);
  }

  public int size() {
    return objects.size();
  }


  public void clear() {
    for (String key : keys) {
      objects.remove(key);
    }
    keys.clear();
  }

  public void destroy() {
    objects.evictAll();
  }


}

@@ -244,18 +244,29 @@
 ject%3E(10
-00
+24 * 1024 * 1
 0);%0A%0A  p

Increase cache memory size for #2678