datasource-cache-min.js revision 3db65648daa65959bc625e4f81cee50763625fc9
YUI.add("datasource-cache",function(C){var B=C.DataSource,A=function(){};A.ATTRS={cache:{value:null,validator:function(D){return((D instanceof C.Cache)||(D===null));},setter:function(D){this.on("request",this._beforeRequest);this.on("response",this._beforeResponse);}}};A.prototype={_beforeRequest:function(E,F){var D=(this.get("cache")&&this.get("cache").retrieve(F.request,F.callback))||null;if(D&&D.response){E.stopImmediatePropagation();this.fire("response",null,C.mix(F,D.response));}},_beforeResponse:function(D,E){if(this.get("cache")){this.get("cache").add(E.request,E,(E.callback&&E.callback.argument));}}};C.Base.build(B,[A],{dynamic:false});},"@VERSION@",{requires:["datasource-base"]});