code: public synchronized boolean add(I_CmsLruCacheObject theCacheObject) {
  
          if (theCacheObject == null) {
              // null can't be added or touched in the cache
              return false;
          }
  
          // only objects with cache costs < the max. allowed object cache costs can be cached!
          if ((m_maxObjectCosts != -1) && (theCacheObject.getLruCacheCosts() > m_maxObjectCosts)) {
              if (LOG.isInfoEnabled()) {
                  LOG.info(
                      Messages.get().getBundle().key(
                          Messages.LOG_CACHE_COSTS_TOO_HIGH_2,
                          new Integer(theCacheObject.getLruCacheCosts()),
                          new Integer(m_maxObjectCosts)));
              }
              return false;
          }
  
          if (!isCached(theCacheObject)) {
              // add the object to the list of all cached objects in the cache
              addHead(theCacheObject);
          } else {
              touch(theCacheObject);
          }
  
          // check if the cache has to trash the last-recently-used objects before adding a new object
          if (m_objectCosts > m_maxCacheCosts) {
              gc();
          }
  
          return true;
      }
docs: Adds a new object to this cache.<p>
  
  If add the same object more than once,
  the object is touched instead.<p>
  
  @param theCacheObject the object being added to the cache
  @return true if the object was added to the cache, false if the object was denied because its cache costs were higher than the allowed max. cache costs per object