~launchpad-pqm/lazr-js/toolchain

« back to all changes in this revision

Viewing changes to src-js/lazrjs/yui/cache/cache-plugin.js

  • Committer: Sidnei da Silva
  • Date: 2009-11-16 00:51:29 UTC
  • mto: This revision was merged to the branch mainline in revision 154.
  • Revision ID: sidnei.da.silva@canonical.com-20091116005129-8ibwjlboa38glaw5
- Improved generation of skin modules and revamped combo service to make it more twisty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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.2.0
6
 
build: 2676
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.2.0' ,{requires:['cache-base']});