public void set(String key, Object value, int objectSize, int expInSec) throws CacheException {
		if(QuickCached.DEBUG) logger.log(Level.FINE, "set key: {0}; objectsize: {1};", 
				new Object[]{key, objectSize});
		
		cmdSets++;
		try {
			setToCache(key, value, objectSize, expInSec);
			
			totalItems++;
		
			if(CommandHandler.isComputeAvgForSetCmd()) {
				long cmdSetsCurrent = cmdSets;

				if(avgKeySize==-1) {
					avgKeySize = (avgKeySize*(cmdSetsCurrent-1) + key.length())/cmdSetsCurrent;
				} else {
					avgKeySize = key.length();
				}

				if(avgValueSize==-1) {
					avgValueSize = (avgValueSize*(cmdSetsCurrent-1) + objectSize)/cmdSetsCurrent;
				} else {
					avgValueSize = objectSize;
				}

				if(avgTtl==-1) {
					avgTtl = (avgTtl*(cmdSetsCurrent-1) + expInSec)/cmdSetsCurrent;
				} else {
					avgTtl = expInSec;
				}
			}
		} catch (Exception ex) {
			Logger.getLogger(BaseCacheImpl.class.getName()).log(Level.SEVERE, "Error: "+ex, ex);
			throw new CacheException(ex.toString());
		}		
	}