The Gallery is deprecated. No new Gallery components may be submitted, and modifying existing components is disabled. For more information please read the Gallery Deprecation blog post. This is a static snapshot of the Gallery for archive purposes.
YUI({
//Last Gallery Build of this module
gallery: 'gallery-2012.05.23-19-56'
}).use('gallery-expiration-cache', function(Y)
{
// create a cache where all items expire after 1 hour (milliseconds)
var time_cache = new Y.ExpirationCache({ expire: 3600000 });
time_cache.put('foo', 'bar');
var data = time_cache.get('foo');
// create a cache where all items expire after 10 reads
var usage_cache = new Y.ExpirationCache(
{
meta: function(value)
{
return {counter:0};
},
expire: function(meta, value)
{
meta.counter++;
return (meta.counter > 10);
}
});
});
/home/y/libexec/ant/bin/ant all Buildfile: build.xml [echo] Starting Build For gallery-expiration-cache clean: init: [mkdir] Created dir: /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-expiration-cache/build_tmp [echo] Starting Build For gallery-expiration-cache -lint-server: [echo] Starting Build For gallery-expiration-cache -node: [echo] For faster builds, install Node.js. -concatdebug: [copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-expiration-cache/build_tmp/ant [delete] Deleting directory /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-expiration-cache/build_tmp/ant -registerdebug: [copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-expiration-cache/build_tmp -prependdebug: -appenddebug: builddebug: -createcore: [copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-expiration-cache/build_tmp -loggerregex: buildcore: -rollupjs: -concatskins: -buildskins: -rollupcss: buildskins: -buildlangs: -rolluplangs: buildlangs: build: minify: [yuicompressor] Compressing /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-expiration-cache/build_tmp/gallery-expiration-cache.js [yuicompressor] Compressed to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-expiration-cache/build_tmp/gallery-expiration-cache-min.js lint: [echo] Using Rhino. Install nodejs to improve jslint speed, or skip with -Dlint.skip=true [java] Running JSLint on : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-expiration-cache/build_tmp/gallery-expiration-cache.js [java] [java] [java] 25, 36: 'timestamp' is not defined. [java] this._meta = config.meta || timestamp; [java] [java] 26, 61: 'expire' is not defined. [java] this._expire = Y.Lang.isNumber(config.expire) ? Y.rbind(expire, null, config.expire) : config.expire; [java] [java] 27, 35: 'initStats' is not defined. [java] this._stats = config.stats ? initStats() : null; [java] [java] [java] local: deploybuild: [copy] Copying 3 files to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-expiration-cache deployassets: deployskins: deploylang: deploydocs: deploy: all: BUILD SUCCESSFUL Total time: 2 seconds
All code on this site is licensed under the BSD License unless stated otherwise.