docs: public void doInternalCache(Identity oid, Object obj, int type)
      {
          processQueue();
          // pass new materialized objects immediately to application cache
          if(type == TYPE_NEW_MATERIALIZED)
          {
              boolean result = putToApplicationCache(oid, obj, true);
              CacheEntry entry = new CacheEntry(oid, obj, TYPE_CACHED_READ, queue);
              if(result)
              {
                  // as current session says this object is new, put it
                  // in session cache
                  putToSessionCache(oid, entry, false);
              }
              else
              {
                  // object is not new, but if not in session cache
                  // put it in
                  putToSessionCache(oid, entry, true);
                  if(log.isDebugEnabled())
                  {
                      log.debug("The 'new' materialized object was already in cache," +
                              " will not push it to application cache: " + oid);
                  }
              }
          }
          else
          {
              // other types of cached objects will only be put to the session
              // cache.
              CacheEntry entry = new CacheEntry(oid, obj, type, queue);
              putToSessionCache(oid, entry, false);
          }
      }