forked from fanruan/fineui
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
456 B
22 lines
456 B
/** |
|
* 缓冲池 |
|
* @type {{Buffer: {}}} |
|
*/ |
|
|
|
(function () { |
|
var Buffer = {}; |
|
var MODE = false;// 设置缓存模式为关闭 |
|
|
|
BI.BufferPool = { |
|
put: function (name, cache) { |
|
if (BI.isNotNull(Buffer[name])) { |
|
throw new Error("Buffer Pool has the key already!"); |
|
} |
|
Buffer[name] = cache; |
|
}, |
|
|
|
get: function (name) { |
|
return Buffer[name]; |
|
} |
|
}; |
|
})(); |