public void set(int key, int value) {
        int hk = hash(key);
        boolean isSet = false;
        int index = -1;
        if (full==false) {
            for (int i=0;i<cache.length;i++) {
                if (cache[(hk+i)%cache.length]==null) {
                    index = i;
                    isSet = true;
                    break;
                }
                if (cache[(hk+i)%cache.length].key==key) {
                    index = i;
                    isSet = true;
                    break;
                }
            }
            if (isSet==false) full = true;
        }
        if (isSet==false) {
            for (int i=0;i<cache.length;i++) {
                if (cache[(hk+i)%cache.length].key==key) {
                    index = i;
                    isSet = true;
                    break;
                }
//                if (cache[(hk+i)%cache.length].time>0) {
//                    index = i;
//                    isSet = true;
//                    break;
//                }
            }
        }
        if (isSet) cache[(hk+index)%cache.length] = new Item(key, value);
        else  cache[hk] = new Item(key,value);
        System.out.println("set("+String.valueOf(key)+","+String.valueOf(value)+")->\n"+this);
    }