Subversion Repositories Applications.papyrus

Rev

Go to most recent revision | Details | 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
 
11
dojo.provide("dojo.uri.cache");
12
dojo.uri.cache = {_cache:{}, set:function (uri, content) {
13
	this._cache[uri.toString()] = content;
14
	return uri;
15
}, remove:function (uri) {
16
	delete this._cache[uri.toString()];
17
}, get:function (uri) {
18
	var key = uri.toString();
19
	var value = this._cache[key];
20
	if (!value) {
21
		value = dojo.hostenv.getText(key);
22
		if (value) {
23
			this._cache[key] = value;
24
		}
25
	}
26
	return value;
27
}, allow:function (uri) {
28
	return uri;
29
}};
30