~ted/lazr-js/annoying-debug-message

« back to all changes in this revision

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

  • Committer: Launchpad Patch Queue Manager
  • Date: 2010-09-09 14:20:30 UTC
  • mfrom: (182.1.3 yui-3.2)
  • Revision ID: launchpad@pqm.canonical.com-20100909142030-13w6vo0ixfysxc15
[r=beuno] Update lazr-js to yui-3.2

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']});