root / trunk / web / dojo / dojox / lang / aspect / memoizerGuard.js @ 10
History | View | Annotate | Download (728 Bytes)
1 |
/*
|
---|---|
2 |
Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
|
3 |
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
4 |
see: http://dojotoolkit.org/license for details
|
5 |
*/
|
6 |
|
7 |
|
8 |
if(!dojo._hasResource["dojox.lang.aspect.memoizerGuard"]){ |
9 |
dojo._hasResource["dojox.lang.aspect.memoizerGuard"]=true; |
10 |
dojo.provide("dojox.lang.aspect.memoizerGuard");
|
11 |
(function(){
|
12 |
var _1=dojox.lang.aspect,_2=function(_3){ |
13 |
var _4=_1.getContext().instance,t;
|
14 |
if(!(t=_4.__memoizerCache)){
|
15 |
return;
|
16 |
} |
17 |
if(arguments.length==0){ |
18 |
delete _4.__memoizerCache;
|
19 |
}else{
|
20 |
if(dojo.isArray(_3)){
|
21 |
dojo.forEach(_3,function(m){
|
22 |
delete t[m];
|
23 |
}); |
24 |
}else{
|
25 |
delete t[_3];
|
26 |
} |
27 |
} |
28 |
}; |
29 |
_1.memoizerGuard=function(_5){ |
30 |
return {after:function(){ |
31 |
_2(_5); |
32 |
}}; |
33 |
}; |
34 |
})(); |
35 |
} |