function AjaxCache(){
    var cache = new Array();
    
    this.add = function(ID,data,target){
        cacheItem = {};
        cacheItem.data = data;
        cacheItem.target = target;
        cache[ID] = cacheItem;
    }
    
    this.get = function(ID){
        return (typeof cache[ID] == 'undefined')?false:cache[ID]; 
    }
    
    this.inCache = function(ID){
        return (typeof cache[ID] == 'undefined')?false:true;
    }
    
    this.clear = function(ID){
        delete cache[ID];
    }
    
    this.getAll = function(){
        for(var i in cache){
            console.log(i);
            console.log(cache[i]);
        }
    }
}
