3
Copyright 2011 Yahoo! Inc. All rights reserved.
4
Licensed under the BSD License.
5
http://yuilibrary.com/license/
7
YUI.add('cache-plugin', function(Y) {
10
* Provides support to use Cache as a Plugin to a Base-based class.
13
* @submodule cache-plugin
17
* Plugin.Cache adds pluginizability to Cache.
22
function CachePlugin(config) {
23
var cache = config && config.cache ? config.cache : Y.Cache,
24
tmpclass = Y.Base.create("dataSourceCache", cache, [Y.Plugin.Base]),
25
tmpinstance = new tmpclass(config);
26
tmpclass.NS = "tmpClass";
32
* The namespace for the plugin. This will be the property on the host which
33
* references the plugin instance.
50
* @value "dataSourceCache"
56
Y.namespace("Plugin").Cache = CachePlugin;
59
}, '3.4.1' ,{requires:['plugin','cache-base']});