datasource-cache-min.js revision e4d8ffa5a2367d80114cae95581037557287ee3e
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(E){var F=C.Base.create("dataSourceCache",E.cache,[C.Plugin.Base,C.Plugin.DataSourceCacheExtension]);F.NS="tmpClass";var D=new F(E);return D;}C.mix(A,{NS:"cache",NAME:"dataSourceCache"});C.namespace("Plugin").DataSourceCache=A;},"@VERSION@",{requires:["datasource-local"]});