Your IP : 18.119.110.76


Current Path : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/landing/cache/
Upload File :
Current File : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/landing/cache/cache-storage.min.js

(function(){"use strict";BX.namespace("BX.Landing");var n=BX.Landing.Utils.isFunction;BX.Landing.Cache=function(){this.store=[]};BX.Landing.Cache.globalStore={};BX.Landing.Cache.get=function(t,i){if(t in BX.Landing.Cache.globalStore){return BX.Landing.Cache.globalStore[t]}if(n(i)){return i()}return i};BX.Landing.Cache.set=function(n,t){BX.Landing.Cache.globalStore[n]=t};BX.Landing.Cache.has=function(n){return n in BX.Landing.Cache.globalStore};BX.Landing.Cache.prototype={add:function(n,t){if(!this.has(n)){this.store.push(new BX.Landing.Cache.Entry(n,t))}},set:function(n,t){this.store=this.store.filter(function(t){return!t.has(n)});this.add(n,t)},has:function(n){return this.store.some(function(t){return t.has(n)})},get:function(n){var t=this.store.find(function(t){return t.has(n)});if(t){return t.value}return null},clear:function(){this.store=[]}}})();