public async Task <bool> UpdateUser(int userId)
        {
            //SERVICE TO UPDATE USER
            //await repository.UpdateUser(userId);

            //REMOVE CACHE
            await _responseCacheService.RemoveAllByPatternAsync($"{userId}:*");

            return(true);
        }
示例#2
0
        public async override Task Invoke(AspectContext context, AspectDelegate next)
        {
            if (context.HasAttributeType(GetType()))
            {
                await next(context);

                return;
            }

            await next(context);

            ResponseCacheService = context.ServiceProvider.GetService <IResponseCacheService>();
            await ResponseCacheService
            .RemoveAllByPatternAsync(RemovePattern);
        }