Ejemplo n.º 1
0
        /// <inheritdoc/>
        public async Task <bool> InvalidateAsync(IEnumerable <string> tags)
        {
            ThrowExceptionIfFaulty();

            var isOk = !IsEnabled || false;

            if (!isOk)
            {
                isOk = LocalStorageService.RemoveData(tags);

                if (isOk && GlobalStorageService != null)
                {
                    await GlobalStorageService.RemoveDataAsync(tags).CoreBaseExtTaskWithCurrentCulture(false);

                    await GlobalStorageHelper.PublishToRemoveDataAsync(tags).CoreBaseExtTaskWithCurrentCulture(false);
                }
            }

            return(isOk);
        }
Ejemplo n.º 2
0
        /// <inheritdoc/>
        public bool Remove(IEnumerable <string> tags)
        {
            ThrowExceptionIfFaulty();

            var isOk = !IsEnabled || false;

            if (!isOk && !GlobalStorageHelper.IsFaulty)
            {
                isOk = LocalStorageService.RemoveData(tags);

                if (isOk && GlobalStorageService != null)
                {
                    GlobalStorageService.RemoveData(tags);

                    GlobalStorageHelper.PublishToRemoveData(tags);
                }
            }

            return(isOk);
        }