]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - jssource/src_files/include/javascript/yui3/build/cache/cache-plugin.js
Release 6.5.0
[Github/sugarcrm.git] / jssource / src_files / include / javascript / yui3 / build / cache / cache-plugin.js
1 /*
2 Copyright (c) 2010, Yahoo! Inc. All rights reserved.
3 Code licensed under the BSD License:
4 http://developer.yahoo.com/yui/license.html
5 version: 3.3.0
6 build: 3167
7 */
8 YUI.add('cache-plugin', function(Y) {
9
10 /**
11  * Plugin.Cache adds pluginizability to Cache.
12  * @class Plugin.Cache
13  * @extends Cache
14  * @uses Plugin.Base
15  */
16 function CachePlugin(config) {
17     var cache = config && config.cache ? config.cache : Y.Cache,
18         tmpclass = Y.Base.create("dataSourceCache", cache, [Y.Plugin.Base]),
19         tmpinstance = new tmpclass(config);
20     tmpclass.NS = "tmpClass";
21     return tmpinstance;
22 }
23
24 Y.mix(CachePlugin, {
25     /**
26      * The namespace for the plugin. This will be the property on the host which
27      * references the plugin instance.
28      *
29      * @property NS
30      * @type String
31      * @static
32      * @final
33      * @value "cache"
34      */
35     NS: "cache",
36
37     /**
38      * Class name.
39      *
40      * @property NAME
41      * @type String
42      * @static
43      * @final
44      * @value "dataSourceCache"
45      */
46     NAME: "cachePlugin"
47 });
48
49
50 Y.namespace("Plugin").Cache = CachePlugin;
51
52
53
54 }, '3.3.0' ,{requires:['plugin','cache-base']});