code: public synchronized I_CmsLruCacheObject remove(I_CmsLruCacheObject theCacheObject) {
  
          if (!isCached(theCacheObject)) {
              // theCacheObject is null or not inside the cache
              return null;
          }
  
          // set the list pointers correct
          boolean nextNull = (theCacheObject.getNextLruObject() == null);
          boolean prevNull = (theCacheObject.getPreviousLruObject() == null);
          if (prevNull && nextNull) {
              m_listHead = null;
              m_listTail = null;
          } else if (nextNull) {
              // remove the object from the head pos.
              I_CmsLruCacheObject newHead = theCacheObject.getPreviousLruObject();
              newHead.setNextLruObject(null);
              m_listHead = newHead;
          } else if (prevNull) {
              // remove the object from the tail pos.
              I_CmsLruCacheObject newTail = theCacheObject.getNextLruObject();
              newTail.setPreviousLruObject(null);
              m_listTail = newTail;
          } else {
              // remove the object from within the list
              theCacheObject.getPreviousLruObject().setNextLruObject(theCacheObject.getNextLruObject());
              theCacheObject.getNextLruObject().setPreviousLruObject(theCacheObject.getPreviousLruObject());
          }
  
          // update cache stats. and notify the cached object
          decreaseCache(theCacheObject);
          return theCacheObject;
      }
docs: Removes an object from the list of all cached objects in this cache,
  no matter what position it has inside the list.<p>
  
  @param theCacheObject the object being removed from the list of all cached objects
  @return a reference to the object that was removed