2021-09-22 17:26:36 +00:00
|
|
|
import Helper from '@ember/component/helper';
|
|
|
|
import { getOwner } from '@ember/application';
|
|
|
|
|
|
|
|
export default class CachedHelper extends Helper {
|
2021-10-26 18:26:04 +00:00
|
|
|
compute([model, params], hash) {
|
|
|
|
const container = getOwner(this);
|
|
|
|
return container.lookup(`service:repository/${model}`).cached(params);
|
2021-09-22 17:26:36 +00:00
|
|
|
}
|
|
|
|
}
|