1 11 package org.eclipse.core.internal.expressions; 12 13 import org.eclipse.core.internal.expressions.util.LRUCache; 14 15 class PropertyCache { 16 17 private LRUCache fCache; 18 19 public PropertyCache(final int cacheSize) { 20 fCache= new LRUCache(100); 21 fCache.setSpaceLimit(cacheSize); 22 } 23 24 public Property get(Property key) { 25 return (Property)fCache.get(key); 26 } 27 28 public void put(Property method) { 29 fCache.put(method, method); 30 } 31 32 public void remove(Property method) { 33 fCache.removeKey(method); 34 } 35 } 36 | Popular Tags |