protected void cacheField(PropField propField) { if (propField != null) { cachedFields.put(propField.getId(), propField); cachedFields.put(propField.getName(), propField); } logger.info("Cache size is [{}]", cachedFields.keySet().size()); }
protected void cacheFields() { Collection<PropField> propFields = getPropFields(); for (PropField propField : propFields) { if (propField != null) { logger.info("Caching [{}]", propField.getName()); cachedFields.put(propField.getId(), propField); cachedFields.put(propField.getName(), propField); } } logger.info("Cache size is [{}]", cachedFields.keySet().size()); }
protected void deleteFromCache(PropField propField) { cachedFields.remove(propField.getId()); cachedFields.remove(propField.getName()); }