public async Task <FilterBase> GetFilter(ContextProvider contextProvider, string objectName, string filterName = "")
        {
            AppUser user = await contextProvider.GetAppUser();

            string filterKey = FilterKey(user, objectName, filterName);

            byte[] data;

            FilterBase filter = GetDecorator(contextProvider, objectName, 0)
                                .GetFilter(contextProvider, filterName);

            data = await GetData(filterKey);

            if (data != null)
            {
                try
                {
                    filter.Deserialize(data);
                }
                catch
                {
                    // Sometimes Redis returns bad data.
                }
            }

            return(filter);
        }
        public async Task StoreFilter(ContextProvider contextProvider, FilterBase filter, string objectName, string filterName)
        {
            AppUser user = await contextProvider.GetAppUser();

            string filterKey = FilterKey(user, objectName, filterName);

            await StoreData(filterKey, filter.Serialize());
        }
        public async Task <AppUser> CurrentUser()
        {
            if (_currentUser == null)
            {
                _currentUser = await contextProvider.GetAppUser();
            }

            return(_currentUser);
        }