import{sha1 as h}from"../../../utils/crypto/sha1.js";import{CATALOG_META_CACHE_NAMESPACE as s,RBAC_CONFIG_HASH_CACHE_KEY as t}from"../../../constants/plugins/catalog-entities.js";class C{cache;constructor(a){this.cache=a}async syncAndDetectChange(a){const c=h(JSON.stringify(a??null)),e=(await this.cache.get({key:t,namespace:s}))?.hash??null,n=e!==null&&e!==c;return e!==c&&await this.cache.set({key:t,namespace:s,value:{hash:c}}),{rbacConfigChanged:n}}}export{C as RbacConfigHashCache};
