datasource-cache-min.js revision 92d0d0ba30617ef9e896a624911f3ec5ff28471c
YUI.add("datasource-cache",function(C){var B=function(){this.after("initializedChange",function(){B.prototype.initializer.apply(this,arguments);});};C.mix(B,{NS:"cache",NAME:"dataSourceCacheExtension"});B.prototype={initializer:function(D){this.doBefore("_defRequestFn",this._beforeDefRequestFn);this.doBefore("_defResponseFn",this._beforeDefResponseFn);},_beforeDefRequestFn:function(E){var D=(this.retrieve(E.request))||null;if(D&&D.response){this.get("host").fire("response",C.mix({response:D.response},E));return new C.Do.Halt("DataSourceCache extension halted _defRequestFn");}},_beforeDefResponseFn:function(D){if(D.response&&!D.response.cached){D.response.cached=true;this.add(D.request,D.response,(D.callback&&D.callback.argument));}}};C.namespace("Plugin").DataSourceCacheExtension=B;function A(F){var E=F&&F.cache?F.cache:C.Cache,G=C.Base.create("dataSourceCache",E,[C.Plugin.Base,C.Plugin.DataSourceCacheExtension]),D=new G(F);G.NS="tmpClass";return D;}C.mix(A,{NS:"cache",NAME:"dataSourceCache"});C.namespace("Plugin").DataSourceCache=A;},"@VERSION@",{requires:["datasource-local"]});