Subversion Repositories Applications.papyrus

Rev

Rev 1318 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1318 alexandre_ 1
/*
2
	Copyright (c) 2004-2006, The Dojo Foundation
3
	All Rights Reserved.
4
 
5
	Licensed under the Academic Free License version 2.1 or above OR the
6
	modified BSD license. For more information on Dojo licensing, see:
7
 
8
		http://dojotoolkit.org/community/licensing.shtml
9
*/
10
 
1422 alexandre_ 11
 
12
 
1318 alexandre_ 13
dojo.provide("dojo.uri.cache");
14
dojo.uri.cache = {_cache:{}, set:function (uri, content) {
15
	this._cache[uri.toString()] = content;
16
	return uri;
17
}, remove:function (uri) {
18
	delete this._cache[uri.toString()];
19
}, get:function (uri) {
20
	var key = uri.toString();
21
	var value = this._cache[key];
22
	if (!value) {
23
		value = dojo.hostenv.getText(key);
24
		if (value) {
25
			this._cache[key] = value;
26
		}
27
	}
28
	return value;
29
}, allow:function (uri) {
30
	return uri;
31
}};
32