mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 07:50:12 +01:00
14 lines
375 B
JavaScript
14 lines
375 B
JavaScript
import { DataCache } from 'meteor-reactive-cache';
|
|
|
|
// global Reactive Cache class to avoid big overhead while searching for the same data often again
|
|
ReactiveCache = {
|
|
getBoard(id) {
|
|
if (!this.__board) {
|
|
this.__board = new DataCache(boardId => {
|
|
return Boards.findOne(boardId);
|
|
});
|
|
}
|
|
const ret = this.__board.get(id);
|
|
return ret;
|
|
}
|
|
}
|