if (cachedPath.equals(document.getName())) {
if (cachedPath != null && (document == null || cachedPath.equals(document.getName()))) {
                public void documentUpdated(DocumentImpl document, int event) {                    if (document == null || event == UpdateListener.ADD || event == UpdateListener.REMOVE) {                        // clear all                        cachedPath = null;                        cached = null;                    } else {                        if (cachedPath.equals(document.getName())) {                            cached = null;                            cachedPath = null;                        }                    }                }