mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-27 11:29:59 +00:00
15 lines
474 B
TypeScript
15 lines
474 B
TypeScript
import ApplicationInstance from '@ember/application/instance';
|
|
import { setCacheEnabled } from '@datahub/utils/api/fetcher';
|
|
|
|
/**
|
|
* Will set the cache based on the env of the application which this addon is running
|
|
*/
|
|
export function initialize(appInstance: ApplicationInstance): void {
|
|
const config = appInstance.resolveRegistration('config:environment') as Record<string, unknown>;
|
|
setCacheEnabled(config.environment !== 'test');
|
|
}
|
|
|
|
export default {
|
|
initialize
|
|
};
|