function Cache() {
	this.pages = new Object();
	this.type = false;
	this.uri = false;
	this.enabled = enabled.cache;
}
Cache.prototype.clear = function() {
	this.pages = new Object();
}
Cache.prototype.disable = function() {
	this.enabled = false;
	this.clear();
}
Cache.prototype.put = function(type,uri,data) {
	this.pages[type + ':' + uri] = data;
}
Cache.prototype.set = function(type,uri) {
	this.type = type;
	this.uri = uri;
}
Cache.prototype.exists = function(type,uri) {
	return this.pages[type + ':' + uri]?true:false;
}
Cache.prototype.get = function(type,uri) {
	return this.pages[type + ':' + uri] || false;
}
Cache.prototype.save = function(data) {
	if (!this.enabled) {
		return false;
	}
	if (!this.uri) {
		this.clear();
		return false;
	}
	this.put(this.type,this.uri,data);
	this.type = false;
	this.uri = false;
	return true;
}
Cache.prototype.restore = function(type,uri) {
	if (this.enabled && this.exists(type,uri)) {
		if (enabled['cache_effects']) {
			setTimeout(process_data,effects_time,this.get(type,uri));
		} else {
			process_data(this.get(type,uri));
		}
		return true;
	} else {
		return false;
	}
}
if (enabled.cache) {
	var cache = new Cache();
}
